Skip to Content.
Sympa Menu

freetds - [freetds] another strange thing with sp's

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: João M L Amaral <joaomarcelodf AT yahoo.com.br>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] another strange thing with sp's
  • Date: Wed, 11 Apr 2007 14:49:39 -0300 (ART)

People, there is another strange thing with stored procedure call. If I build
the statement like "{ call sp_myproc(?) }", do not work. But if I build
statement like "{ call [owner].[sp_myproc] (?) }", then work. I have to put
onwer!!

Is this correct?

In that case, diagnostic is not returned.

I'm connecting in SQLServer...

João M L Amaral <joaomarcelodf AT yahoo.com.br> escreveu:
Hi Frediano, thank's for your help.

But problem continues. In odbc32 from Microsoft, I do this. It realy works.
But in unixODBC don't.

My SP do not return record sets or rows affected, simply set an output
parameter.

See:

create procedure sp_test
@res int output
as
set @res = 456

Thank you very much...

"ZIGLIO, Frediano, VF-IT" escreveu:
>
> Hi good people, I'm new in this list and new too in unixODBC.
> I'm having a problem with output parameter and return
> values of SQLServer stored procedures.
>
> I'm using FreeTDS driver but unixODBC API. So, I believe to
> be doing everything in right way, but don't work.
>
> I created a SP with an output parameter. My code do:
>
> - SQLPrepare with statement "{ call sp_myproc (?) }"
> - SQLBindParameter with
> SQL_PARAM_OUTPUT
> - SQLExecute
>
> Do not occurs errors, but the parameter is not returned.
>
> This also occurs with return values of SPs with statement
> "{ call sp_myproc (?) }" and SQLBindParameter with
> SQL_PARAM_OUTPUT.
>
> Some help is welcome...
> Thaks
>

Hi,
this is not sufficient, you have to read all data
(SQLFetch/SQLMoreResults) returned by SQLExecute cause parameters are
the last thing server returns

Frediano Ziglio

_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds


__________________________________________________
Fale com seus amigos de graça com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds



Atenciosamente,
João M L Amaral
__________________________________________________
Fale com seus amigos de graça com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/




Archive powered by MHonArc 2.6.24.

Top of Page