SQL SERVER 7.0 and VB6 Connections

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2009
Posts: 5
Reputation: jbfsantelices is an unknown quantity at this point 
Solved Threads: 0
jbfsantelices jbfsantelices is offline Offline
Newbie Poster

SQL SERVER 7.0 and VB6 Connections

 
0
  #1
Jul 16th, 2009
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...
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 860
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 157
vb5prgrmr vb5prgrmr is offline Offline
Practically a Posting Shark

Re: SQL SERVER 7.0 and VB6 Connections

 
0
  #2
Jul 16th, 2009
Couple of ways. Are you using an ODBC DSN or are you going DSN Less?

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


Good Luck
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 5
Reputation: jbfsantelices is an unknown quantity at this point 
Solved Threads: 0
jbfsantelices jbfsantelices is offline Offline
Newbie Poster

Re: SQL SERVER 7.0 and VB6 Connections

 
0
  #3
Jul 17th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 860
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 157
vb5prgrmr vb5prgrmr is offline Offline
Practically a Posting Shark

Re: SQL SERVER 7.0 and VB6 Connections

 
0
  #4
Jul 18th, 2009
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
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 5
Reputation: jbfsantelices is an unknown quantity at this point 
Solved Threads: 0
jbfsantelices jbfsantelices is offline Offline
Newbie Poster

Re: SQL SERVER 7.0 and VB6 Connections

 
0
  #5
Jul 19th, 2009
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!
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 860
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 157
vb5prgrmr vb5prgrmr is offline Offline
Practically a Posting Shark

Re: SQL SERVER 7.0 and VB6 Connections

 
0
  #6
Jul 20th, 2009
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
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC