943,515 Members | Top Members by Rank

Ad:
Jul 16th, 2009
0

SQL SERVER 7.0 and VB6 Connections

Expand Post »
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...
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jbfsantelices is offline Offline
5 posts
since Apr 2009
Jul 16th, 2009
0

Re: SQL SERVER 7.0 and VB6 Connections

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

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


Good Luck
Reputation Points: 156
Solved Threads: 296
Posting Virtuoso
vb5prgrmr is offline Offline
1,670 posts
since Mar 2009
Jul 17th, 2009
0

Re: SQL SERVER 7.0 and VB6 Connections

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

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. cnnLGUREFERENCE.ConnectionString = "Provider=SQLOLEDB;SERVER=192.168.0.46;Database=LGUREFERENCE;UID=sa;PWD=password;Persist Security Info=True"
  2. 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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jbfsantelices is offline Offline
5 posts
since Apr 2009
Jul 18th, 2009
0

Re: SQL SERVER 7.0 and VB6 Connections

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
Reputation Points: 156
Solved Threads: 296
Posting Virtuoso
vb5prgrmr is offline Offline
1,670 posts
since Mar 2009
Jul 19th, 2009
0

Re: SQL SERVER 7.0 and VB6 Connections

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!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jbfsantelices is offline Offline
5 posts
since Apr 2009
Jul 20th, 2009
0

Re: SQL SERVER 7.0 and VB6 Connections

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.p...string+builder

There are a couple more out there also...


Good Luck
Reputation Points: 156
Solved Threads: 296
Posting Virtuoso
vb5prgrmr is offline Offline
1,670 posts
since Mar 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Vb6 help! explain this..
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Draw graph using vb6 taking data from database





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC