Timeout from VB.NET program

F

fniles

I am using VB.NET 2008 and SQL Server 2000.
From SQL Enterprise Manager I can do a select and a delete, but inside my
VB.NET 2008 program I kept getting a timed out.
Like this delete statement:
delete from tickdata30min where symbol = 'abc' and sequencenumber =
'20100301-0000'

Do you know why I can do it from SQL Enterprise Manager but timed out from a
program ?

Thanks
 
G

Gregory A. Beamer

fniles said:
I am using VB.NET 2008 and SQL Server 2000.
From SQL Enterprise Manager I can do a select and a delete, but inside my
VB.NET 2008 program I kept getting a timed out.
Like this delete statement:
delete from tickdata30min where symbol = 'abc' and sequencenumber =
'20100301-0000'

Do you know why I can do it from SQL Enterprise Manager but timed out from
a program ?

How long does it take in Enterprise Manager? If it takes a bit of time, then
you need to extend the command and possibly connection timeout.

If very short, you may need to look at the protocols you have set up for
connection and make sure you have a parity. By default, many of the
protocols are turned off on the server, limiting what you can connect to.
Often times, simply enabling something like TCP/IP as a network library in
the config tool makes the problems go away.

--
Peace and Grace,
Greg

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

************************************************
| Think outside the box! |
************************************************
 
M

Michel Posseth [MCP]

AFAIK

The standard timeout time is 20 seconds , so if the query takes longer then
just change the apropriate properties ( cmd and con ) and you should be
fine

HTH

Michel Posseth
 
G

Gregory A. Beamer

Michel Posseth said:
AFAIK

The standard timeout time is 20 seconds , so if the query takes longer
then just change the apropriate properties ( cmd and con ) and you should
be fine

Overall, I would agree. But you need to troubleshoot, as extending time may
not be the proper solution if you just have a network protocol mismatch.
Also turning on SQL Browser will often cure a great number of problems (in
fact, some problems can only be cured by turning on SQL Browser and will
time out no matter how much you extend the standard timeout).

NOTE: There is a timeout on the command and the connection, so you have to
look at both on very long running queries ... and consider if the app is
better served with async at this point.

--
Peace and Grace,
Greg

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

************************************************
| Think outside the box! |
************************************************
 
F

fniles

Thank you all for the replies.
When I ran the query on SQL EM, it took less than 1 second to do it.
I increased the time out property to no avail.
The problem was fixed by rebooting my machine (the client machine).

Thanks again.
 
S

sloan

Gregory is correct on the protocols setup. That can kill you.

Also, google "parameter sniffing" "sql server".

I know you say it went away.........but in case it returns.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top