Question Locked

To connect to the ms sql server from vb 6.0 application from many users

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Please any one could help me how do i do it now. I have completed working my application in vb 6.0 and i want to run from the clients PC in a network. where i have sql server in server room and i want to connect the application from the users' PC. when i was doing the project both application and database(slq server)are in my machine. now when compiled and try to run from the other machine its not working. So please how do i point the server to the new location from the application? Do i need to change the code there? how do i make my application automatically find the database server in the server room from different clients? Please help me.

4 replies

by robaaaaaa2

The best way to do this is to change your connection method - I presume you open the database connection in sub Main() ? put your executable in a server shared folder (so the users run the .exe from the server) and use a .udl file (Universal Dat Link), so in my sub Main() I have:

Set cnCP = New ADODB.Connection
cnCP.Open "file name=" & App.Path & "\MyDatabase.udl"

This method will then work with *any* odbc database, access, SQLServer, Oracle....

by steve.ingle

IMHO, using udl's is a glaring security hole.
However, if your network environment is well locked down, it's quick and easy

This discussion is closed to new replies.