Sql Server Timeout Problem

B

BBC1009

I have an application connected to an overseas sql-server using port 1433.
But recently it always timeout the connection. Any solution to avoid
this??? I am using the VB.net Windowed Form with .net 2002, SQL-Sever 2000
Enterprise


Thanks!
 
C

Chris Calzaretta

with you connection object you can set the timeout higher.
you could also make sure you can hit port 1433 before you try to create the
connection.

or where you declare your connection you can put it in a try catch statement
and loop until you have a connection.
 
B

BBC1009

Do you meant that set the "connection timeout" to higher? I already set it
to 600 but still time-out.

I delcare the connection on the first login form and keep open thru the
program. Is it a problem?
 
B

BBC1009

My connection string is :

Data Source=xxxx.vicp.net;user Id=sa;password=abc;Initial
Catalog=ffs;Connect Timeout=600
 
P

Peter Proost

Hi

I would only open the connection if you need it, because in .net the
connections get pooled, so I'd advise not to keep the connection open all
the time, I think this could cause a timeout, does the timeout occure when
you first want to connect or after a couple of minutes if the program is
already open?

Greetz Peter
 
B

BB2046

When it connects to the local database, it should be no problem. The
problem only occur when connecting to the overseas server ie
Hongkong-->China.
We tried open the connection each time before but the performance is far
away from keep it open.
The first connect has no problem (login process) but it timeout when perform
a query or execute a sql.

Thanks
 
?

=?ISO-8859-1?Q?=22D=2E_Andr=E9_Dhondt=22?=

BBC1009 said:
I have an application connected to an overseas sql-server using port 1433.
But recently it always timeout the connection. Any solution to avoid
this??? I am using the VB.net Windowed Form with .net 2002, SQL-Sever 2000
Enterprise


Thanks!
Have you considered Queued Components? If your app doesn't want to wait
for the overseas connection, a local queue may add the fault tolerance
you need.
 
P

Peter Proost

How fast is the line to china? Maybe it isn't fast enough for a big query,
but it's fast enough for small selects
just my toughts...

Greetz
 
P

Peter Proost

You can also specify the sqlcommand timeout,
SqlCommand.CommandTimeout

greetz Peter
 

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