Stored procedure behave different in Query Analyser and ODBC, is it timeout?

Stored procedure behave different in Query Analyser and ODBC, is it timeout?

Post by iritgef-go » Tue, 09 Dec 2003 20:04:09


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,
Irit.
 
 
 

Stored procedure behave different in Query Analyser and ODBC, is it timeout?

Post by Petaria » Wed, 10 Dec 2003 02:24:13


--------------040406050502000504030907--

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>


Irit wrote:

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,
Irit.




<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
Try using a generic tool, which also uses ODBC API such as MS Query or WinSQL(<a class="moz-txt-link-freetext" href="http://www.synametrics.com/winsql">http://www.synametrics.com/winsql</a>).
This will at least rule out the possibility of the driver doing something
weird.<br>
<br>
Pete.<br>
<br>
<br>
<br>
<div class="moz-signature">-- <br>

<style type="text/css">
P {
font-family: Tahoma, Arial, Verdana;
font-size: 12px;
color: black;
}
H1 {}
H2 {}
H3 {}
HR{
line-height : 1;
text-align : left;
height : 1;
width : 80%;
color : #CC0000;
}
A {}
A:Visited {}
A:Active {}
A:Hover {}
BODY {
font-family: Tahoma, Arial, Verdana;
font-size: 12px;
color: black;
}
table {
font-family: Tahoma, Arial, Verdana;
font-size: 11px;
color: black;
}


</style>
<p> You don't pay to get spam, why pay to clean it?<br>
Visit <a href="http://www.spammarshall.com">http://www.spammarshall.com</a>
to create an account for free<br>
<a href="http://www.spammarshall.com" target="_blank"> <img
src="http://www.spammarshall.com/SpamMarshall/images/logo-g.gif"
border="0">
</a> </p>
</div>
<br>
Irit wrote:<br>

<pre wrap="">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 ide
 
 
 

Stored procedure behave different in Query Analyser and ODBC, is it timeout?

Post by iritgef-go » Thu, 11 Dec 2003 17:49:28

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.