Timeout error

janilane

Active member
Joined
Jan 23, 2008
Messages
30
Programming Experience
Beginner
Hello, can someone please help me? When I run the stored procedure in SQL Query Analyzer, it works fine and takes only a few seconds. When I try to access it in my VB Express code using this:

cmdProcInsert.ExecuteNonQuery()

it times out. The error is :

"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

I tried adding timeout value to it like:

cmdProcInsert.CommandTimeout = 0

but the process is just hanging.

What's wrong with calling it in VB against using plain "EXEC" command in SQL?

Thanks:confused::confused:
 
:confused:Hi, Got a suggestion since I'm not getting any response. Do you think it would be okay to user 'ExecuteScalar' instead of 'ExecuteNonQuery' to call my stored procedure?

Thanks
 
Back
Top