Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Unable to open DSN connection

Author  Topic 

Shaik Baji
Starting Member

1 Post

Posted - 2009-05-27 : 06:59:44
Hi,
I had a vb6 application. It is running fine on 32-bit Windows OS
with MS SQL Server 2005 but now i want to run my application on
64-bit Windows Os with MS SQL Server 2005 but while running on 64-bit
windows OS i got following error "Data source name not found and no default driver specified". My code is as follows

Dim AdoCon As ADODB.Connection
Set AdoCon = New ADODB.Connection
AdoCon.Open "MyDSN", "sa", "sa123#"

can any one please tell me, is this problem with SQL server driver or DSN ?

NOTE: The DSN-Less connecton is working fine. The DSN-Less code is as follows

Dim strconnect As String
strconnect = "Provider=SQLOLEDB.1;Password=sa123#;Persist Security Info=True;User ID=sa;Initial Catalog=QualityCenter_Demo_db;Data Source=ARSINDEMO-2"
Dim AdoCon As ADODB.Connection
Set AdoCon = New ADODB.Connection
AdoCon.Open strconnect


Thanks in advanced

Regards
shaik baji
sk_baji4u@yahoo.com
   

- Advertisement -