Groups | Blog | Home
all groups > sql server odbc > december 2003 >

sql server odbc : Stored procedure behave different in Query Analyser and ODBC, is it timeout?


iritgef-google NO[at]SPAM cs.huji.ac.il
12/8/2003 3:04:09 AM
Hello,

I have a stored procedure, that work fine from the Query Analyser.
I used it from C code by ODBC api - not all of the rows that supposed
to be changed, were changed.
so i added SET NOCOUNT ON in the stored procedure, then it worked.

After few days i tried it on another computer and it's not working
again!
so i thought, it might be TIMEOUT.

a. according to the documentation, the default of the ODBC statment
timeout is zero, meaning - no timeout!

b. i tried to change the timeout of the statment (and the connection)
but it didn't help. i changed it to 600..

c. the ODBC execute return no error.

any idea what am i doing wrong?


thanks,
Petarian
12/8/2003 12:24:13 PM
Try using a generic tool, which also uses ODBC API such as MS Query or
WinSQL(http://www.synametrics.com/winsql). This will at least rule out
the possibility of the driver doing something weird.

Pete.



--

You don't pay to get spam, why pay to clean it?
Visit http://www.spammarshall.com to create an account for free
<http://www.spammarshall.com>


[quoted text, click to view]

Hello,

I have a stored procedure, that work fine from the Query Analyser.
I used it from C code by ODBC api - not all of the rows that supposed
to be changed, were changed.
so i added SET NOCOUNT ON in the stored procedure, then it worked.

After few days i tried it on another computer and it's not working
again!
so i thought, it might be TIMEOUT.

a. according to the documentation, the default of the ODBC statment
timeout is zero, meaning - no timeout!

b. i tried to change the timeout of the statment (and the connection)
but it didn't help. i changed it to 600..

c. the ODBC execute return no error.

any idea what am i doing wrong?


thanks,
iritgef-google NO[at]SPAM cs.huji.ac.il
12/10/2003 12:49:28 AM
Well, i called the Stored Procedure from WinSQL with ODBC, nocount is
off, but it worked perfect. meaning, the stored procedure did all what
it supposed to.


Irit.


[quoted text, click to view]
AddThis Social Bookmark Button