By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,016 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Timeout issue when connection to SQL Server in Wireless environment

P: n/a
I am having problems with long timeouts when connecting to
or executing commands in SQL Server 2000 SP3. I am
writing an application that will be used on laptops within
an environment that is wireless. The application is
written in VB.NET using the SQL Server managed provider.

I have set the "Connect Timeout" parameter on the
connection string to 15 seconds and whenever I execute a
command, I set the CommandTimeout property to 15 seconds
on the command object.

When I open a connection where there is poor signal
strength or I am in a dead spot, I have timed the various
timeouts the Open method gives me on the connection to be
anywhere between 25 seconds to 70 seconds. Similiar
results with sending commands.

When I cannot open the connection I give the user the
ability to retry the operation that opens the database
connection after they have moved back into range. I
implemented this with a looping construct and messagebox
allowing the user to hit Retry or Cancel up to 5 tries
before it automatically cancels.

Sometime on the retry it will work, but sometimes the
second time through the loop to open the connection will
not work even if the laptop was moved back into range.

I am guessing that this behavior has to do with the
connection pooling combined with the fluctuating signal
strength and timing on the WiFi network. However, I have
been unable to find documentation or post in the
news/users groups that will help me with this issue. Any
help or experiences in this type of environment would be
appreciated.

Thanks,
Dave
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
David Gamble wrote:
Sometime on the retry it will work, but sometimes the
second time through the loop to open the connection will
not work even if the laptop was moved back into range.


I don't know about what setting in Sql-Server or MSDE it depends on, but I
had exactly the same problem.

It was due to Persist Security Info property, apparently not supported. To
solve the problem, I ALWAYS set the connections string of the connection
object before opening the connection, even if the connectionstring had
already been set before previous connection attempt.

If you set the connection string with user and password, and you then print
the connectionstring (obtained from the connection object), it happens that
this string is different from the original string you inserted in the
property.
Sometimes, the PWD parameter has disappeared, even if Persist Security Info
was TRUE.
At the present, I don't know which setting of the server or the OleDb
provider I can work on to make this feature enabled or not.

Bye

Alberto
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.