Mar 3, 2006 #1 dmando84 Programmer Dec 28, 2005 68 US Hello, I am trying connect a VB6 application to SQL Server using a DSN which I created. I am having alot of problems. Any help would be appreciated. Dave
Hello, I am trying connect a VB6 application to SQL Server using a DSN which I created. I am having alot of problems. Any help would be appreciated. Dave
Mar 3, 2006 #2 jbenson001 Programmer Jan 7, 2004 8,172 US You many want to try the VB forums. What code do you have so far? What are the problems you are having? Jim Upvote 0 Downvote
You many want to try the VB forums. What code do you have so far? What are the problems you are having? Jim
Mar 3, 2006 Thread starter #3 dmando84 Programmer Dec 28, 2005 68 US This is what I have so far.. but, I keep getting an error message saying that the connection string is not valid.. What is the proper syntax for this? Thank you, Dave Public Sub ConnectToDatabase() Set cnn = New ADODB.Connection sCnn = "Provider=SQLOLEDB; Initial Catalog=DataBaseName;Data Source=DSN;" End Sub Upvote 0 Downvote
This is what I have so far.. but, I keep getting an error message saying that the connection string is not valid.. What is the proper syntax for this? Thank you, Dave Public Sub ConnectToDatabase() Set cnn = New ADODB.Connection sCnn = "Provider=SQLOLEDB; Initial Catalog=DataBaseName;Data Source=DSN;" End Sub
Mar 3, 2006 #4 gmmastros Programmer Feb 15, 2005 14,910 US sCnn[!].ConnectionString[/!] = "Provider=SQLOLEDB; Initial Catalog=DataBaseName;Data Source=DSN;" -George Strong and bitter words indicate a weak cause. - Fortune cookie wisdom Upvote 0 Downvote
sCnn[!].ConnectionString[/!] = "Provider=SQLOLEDB; Initial Catalog=DataBaseName;Data Source=DSN;" -George Strong and bitter words indicate a weak cause. - Fortune cookie wisdom