1.11M Members

SQL SERVER 7.0 and VB6 Connections

 
0
 

Hi to our community!

Just want to get some idea regarding the connection setup of SQL Server 7.0, I've been doing an application written in VB6 and I used SQL Server 7.0 as a storage of my database. On my local pc I can successfully connected to SQL and manipulate all the data in database.

The problem is, how can I set up the connection to become a remote server so that another PC can connect to my database(SQL Server 7.0) and use the application I've created in real time? I've been searching the net and I can't find a good answers.

Hope you guys can help me...Thanks in advance...

 
0
 

Couple of ways. Are you using an ODBC DSN or are you going DSN Less?

DSN Less see http://www.connectionstrings.com


Good Luck

 
0
 

I used the Connection string via an IP address (see the code below) and successfully connected...

cnnLGUREFERENCE.ConnectionString = "Provider=SQLOLEDB;SERVER=192.168.0.46;Database=LGUREFERENCE;UID=sa;PWD=password;Persist Security Info=True"
cnnLGUREFERENCE.Open

But when I run the application in another computer I got this error:
Run-time error'-2147467259(80004005)': SQL Server does not exist or access is denied.


I also used the OLE db Provider Connection String but same error encountered...

Thanks for the assistance.

 
0
 

Check the settings of your server and OS and I think you need to specify the port of 1433...

see...

http://www.connectionstrings.com/sql-server#6

then scroll down a bit for internet connection


Good Luck

 
0
 

I really appreciate your help, thank u so much! Is the problem really in the connection string? Or do i need to configure first or setup the connection of the two pcs? Thanks!

 
0
 

Normally, on a MS network that uses TCP/IP, the named pipes protocal is also installed and is used as a secondary protocal. Now, SQL server is very use to this protocal and normally when you create an ODBC DSN it is via named pipes but you can specify other protocals when you create it.

So, first off, I would suggest just as an experiment, to see if you can create an ODBC DSN from one computer to the server. Don't forget to test the connection to make sure it works.

Then if the ODBC DSN does work then yes you do have to tweak your connection string some...

Search the web for vb6 connection string builder

and this is a vb6 add-in someone made

http://www.vbforums.com/showthread.php?t=243215&highlight=connection+string+builder

There are a couple more out there also...


Good Luck

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article