473,434 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

Sql Server Timeout Problem

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!
Nov 21 '05 #1
8 5751
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.

"BBC1009" <be******@yahoo.com.hk> wrote in message
news:O4****************@TK2MSFTNGP09.phx.gbl...
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!

Nov 21 '05 #2
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?
"Chris Calzaretta" <cc*********@hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:OS**************@TK2MSFTNGP14.phx.g bl...
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.

"BBC1009" <be******@yahoo.com.hk> wrote in message
news:O4****************@TK2MSFTNGP09.phx.gbl...
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!


Nov 21 '05 #3
My connection string is :

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


"BBC1009" <be******@yahoo.com.hk> ¼¶¼g©ó¶l¥ó·s»D:%2******************@TK2MSFTNGP12.p hx.gbl...
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?
"Chris Calzaretta" <cc*********@hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:OS**************@TK2MSFTNGP14.phx.g bl...
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.

"BBC1009" <be******@yahoo.com.hk> wrote in message
news:O4****************@TK2MSFTNGP09.phx.gbl...
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!



Nov 21 '05 #4
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
"BBC1009" <be******@yahoo.com.hk> schreef in bericht
news:uL**************@TK2MSFTNGP12.phx.gbl...
My connection string is :

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


"BBC1009" <be******@yahoo.com.hk>

¼¶¼g©ó¶l¥ó·s»D:%2******************@TK2MSFTNGP12.p hx.gbl...
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?
"Chris Calzaretta" <cc*********@hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:OS**************@TK2MSFTNGP14.phx.g bl...
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.

"BBC1009" <be******@yahoo.com.hk> wrote in message
news:O4****************@TK2MSFTNGP09.phx.gbl...
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!



Nov 21 '05 #5
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
"Peter Proost" <pp*****@nospam.hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:uv**************@TK2MSFTNGP14.phx.g bl...
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
"BBC1009" <be******@yahoo.com.hk> schreef in bericht
news:uL**************@TK2MSFTNGP12.phx.gbl...
My connection string is :

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


"BBC1009" <be******@yahoo.com.hk>

¼¶¼g©ó¶l¥ó·s»D:%2******************@TK2MSFTNGP12.p hx.gbl...
> 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?
>
>
> "Chris Calzaretta" <cc*********@hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:OS**************@TK2MSFTNGP14.phx.g bl... >> 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.
>>
>>
>>
>> "BBC1009" <be******@yahoo.com.hk> wrote in message
>> news:O4****************@TK2MSFTNGP09.phx.gbl...
>>>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!
>>>
>>>
>>
>>
>
>



Nov 21 '05 #6
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
"BB2046" <ob*****@yahoo.com> schreef in bericht
news:#j*************@TK2MSFTNGP15.phx.gbl...
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
"Peter Proost" <pp*****@nospam.hotmail.com>

¼¶¼g©ó¶l¥ó·s»D:uv**************@TK2MSFTNGP14.phx.g bl...
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
"BBC1009" <be******@yahoo.com.hk> schreef in bericht
news:uL**************@TK2MSFTNGP12.phx.gbl...
My connection string is :

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


"BBC1009" <be******@yahoo.com.hk>

¼¶¼g©ó¶l¥ó·s»D:%2******************@TK2MSFTNGP12.p hx.gbl...
> 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?
>
>
> "Chris Calzaretta" <cc*********@hotmail.com>

¼¶¼g©ó¶l¥ó·s»D:OS**************@TK2MSFTNGP14.phx.g bl...
>> 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.
>>
>>
>>
>> "BBC1009" <be******@yahoo.com.hk> wrote in message
>> news:O4****************@TK2MSFTNGP09.phx.gbl...
>>>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!
>>>
>>>
>>
>>
>
>



Nov 21 '05 #7
You can also specify the sqlcommand timeout,
SqlCommand.CommandTimeout

greetz Peter
"Peter Proost" <pp*****@nospam.hotmail.com> schreef in bericht
news:ea**************@TK2MSFTNGP14.phx.gbl...
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
"BB2046" <ob*****@yahoo.com> schreef in bericht
news:#j*************@TK2MSFTNGP15.phx.gbl...
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
"Peter Proost" <pp*****@nospam.hotmail.com>

¼¶¼g©ó¶l¥ó·s»D:uv**************@TK2MSFTNGP14.phx.g bl...
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
"BBC1009" <be******@yahoo.com.hk> schreef in bericht
news:uL**************@TK2MSFTNGP12.phx.gbl...
> My connection string is :
>
> Data Source=xxxx.vicp.net;user Id=sa;password=abc;Initial
> Catalog=ffs;Connect Timeout=600
>
>
>
>
> "BBC1009" <be******@yahoo.com.hk>
¼¶¼g©ó¶l¥ó·s»D:%2******************@TK2MSFTNGP12.p hx.gbl...
> > 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?
> >
> >
> > "Chris Calzaretta" <cc*********@hotmail.com>
¼¶¼g©ó¶l¥ó·s»D:OS**************@TK2MSFTNGP14.phx.g bl...
> >> 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.
> >>
> >>
> >>
> >> "BBC1009" <be******@yahoo.com.hk> wrote in message
> >> news:O4****************@TK2MSFTNGP09.phx.gbl...
> >>>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!
> >>>
> >>>
> >>
> >>
> >
> >
>
>



Nov 21 '05 #8
BBC1009 wrote:
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.
Nov 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Hasan | last post by:
Hi I'm having a problem with deadlocks in a table in SQL server when trying to update it through Biztalk 2004. There is no problem when I use the same Biztalk solution to update a similar dummy...
1
by: serge | last post by:
We have an ASP application installed on one powerful Win 2003 and the SQL Server on another Win 2003. We have two copies of the application (identical, one for production and one for test...
2
by: Dicky Cheng | last post by:
Hi, I am using .net remoting technology. I set up a .net remoting client and server in IIS. When the client calls the server, the server will run a long duration method (30-60seconds). I have a...
1
by: Ville Huovinen | last post by:
Platform: Windows 2003 Server (MS SQL Server 2003 SP3) Language: C# Problem: My stored procedures times out randomly, some proces works fine when using them from C#, and some generate...
2
by: Mustafa Yesilkaya | last post by:
Hi. I have a problem with sql server. I have thousands of record in a database table. When i want to list all with SELECT * command in asp.net page, an error message comes : SQL SERVER TIMEOUT. ...
9
by: John | last post by:
I have a single server running SQL Server 2000 sp3a, and acting as a ASP.NET webserver (.net 1.1 sp1). W2k sp4. Dual Xeon processor, 2 gigs RAM. Everything works fine, but sometimes when I...
2
by: Bernie Yaeger | last post by:
I'm getting the following error - not always, only randomly - when I run a certain routine (the routine is a simple executenonquery and it appears to complete despite the message) against sql...
4
by: VB Programmer | last post by:
When I run my ASP.NET 2.0 web app on my dev machine it works perfect. When I precomile it to my web deployment project and then copy the debug files to my web server I get this problem when trying...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.