when im running my program in my com the database conneccts but if i load the program in a different computer the program runs but the database wont connect. i used the wizard making the connection please advice thanks
Four answers:
anonymous
2008-09-30 09:31:13 UTC
You can code the datasource (server name) to pick up the current computer's name.
dim myConn as New SqlConnection("DataSource=" & My.Computer.Name & " .......(the rest of the connection string")
This will use the name of the computer the application is running on, provided the computer is running some version of MSSQL. MSDE 2000 or MSSQL 2005 Express.
anonymous
2008-09-30 09:19:03 UTC
Well, it depends on how you are actually making the connection. To me, this sounds like an ODBC issue - like the computer you are trying to run it on does not have the ODBC connection set up properly, or does not have the appropriate ODBC driver.
I have had similar issues in the past, and it was almost always an ODBC issue. I would start there.
Good luck : )
UPDATE : Thanks for clarifying. I think I know what you are asking about now. Hee, check this out :
A good example of how to include connection info in web config, and call it from the code behind (you can apply to VB too)
anonymous
2008-09-30 09:11:59 UTC
make sure the server isnt blocking connections from the port. and make sure the server allows multiple connection at one time on the same port. it sound like a port issue more than software or network ID problem.
what database program are you using? like lexisnexus? or OCR software?
dsavi
2008-09-30 09:06:26 UTC
I suppose you have the database address set up correctly relative to your computer? As in, if you have the server address as 127.0.0.1:[port number], it isn't going to work elsewhere on your network. Same goes for local addresses, 10.0.0.8:[port number] isn't going to work over the internet. Make sure that's done correctly.
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.