Problem connecting to remote database

beerbsh316

Member
Joined
Jan 10, 2007
Messages
10
Programming Experience
5-10
I am developing an application that will be used on multiple computers on a network with the database being on a server within the network. Currently I am testing my app by networking 2 computers with one of them housing the database. I am publishing my app and installing it on both computers. On the local machine it works fine however on the remote machine I keep getting timeout errors but when I click continue from the unhandled exception box the data shows up in my program. This happens every time I do anything within the program. I do not understand this since I set the program to only load datafrom the database at startup and then use a dataset within the program for speed and only connect to the database again when saving deleting or editing data. Any explanations/tips would be appreciated.
 
Sounds more like a network issue than a code issue... Have you tried using the ip address of the machine instead of its name? How about changing authentication method on the sql server? Is the sqls browser service started on the db host?
 
Maybe try this

Whats the whole exception.ToString say? There maybe some more in there to help diagnose.

1) you can restart SQL Server also maybe try disabling NamedPipes as one of the network libraries. Open the Sql Server Program group and select Client Network Library, select the NamedPipes in right list box and remove.

Restart SQL server service. Check the LOG in Sql Enterprise Manager | MANAGEMENT node, SQL SERVER LOGS nodes | Current Log

Look for "SQL server listening on TCP, Shared Memory." and then "SQL Server is ready for client connections"

2) If using stored procedures put SET NOCOUNT ON as the first line and SET NOCOUNT OFF as the last line with your coded being in between

3) Assuming SQL2000 make sure have at least Service Pack 3

4) Googling produce a couple of hits for TIMEOUT SQL SERVER CONNECTIVITY
http://support.microsoft.com/kb/313661

5) Maybe install the sql client tools on the other machine and try running some queries over the sql query analyzer with profiler running on the server to see RPC or SQL BATCH etc.

6) I am clueless here but maybe the chosen network protocol stack and network security chosen
 
Back
Top