|
-
May 11th, 2008, 07:32 AM
#1
Thread Starter
Lively Member
Unable to connect to SQL Server 2005
Hy people, I am using VB 6.0 and I am trying to connect to an SQL Server 2005 database but when running my application I get the following error:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.
and my code is:
Dim ConnStr As String
Dim db As New ADODB.Connection
Dim rss As New ADODB.Recordset
Dim sql As String
sql = "Select * from table"
ConnStr = "SQLNCLI; Server=ServerIP\SQLEXPRESS; Database=DatabaseName;Uid=usernname;Pwd=Password;"
db.Open ConnStr
rs.CursorLocation = adUseClient
rs.Open sql, db, adOpenDynamic, adLockPessimistic
Can anyone help me, pleaseeeeeeeeeeeeeee???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|