Creating ODBC connection to SQL Server 6.5 with VB4 
Author Message
 Creating ODBC connection to SQL Server 6.5 with VB4

I am trying to create a connection to a SQL Server 6.5 database using
Visual Basic 5 and am stuck on the following:

Private Sub cmdInstall_Click()

Dim strAttrib As String
Dim intReturn As Integer

strAttrib = "Server = Prairie" & Chr(0)
strAttrib = strAttrib & "Database = Scopus" & Chr(0) & Chr(0)
strAttrib = "DSN=TestScopusConn" & Chr(0) & strAttrib

intReturn = SQLConfigDataSource(0, ODBC_ADD_DSN, "Sql Server", strAttrib)
If intReturn <> 1 Then
    MsgBox "SQLConfigDataSource call failed"
Else
    MsgBox " SQLConfigDataSource call succeeded!"
End If

End Sub

I keep getting a 'File not found' error, if you have any ideas as to why,

Thank you



Fri, 26 Nov 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. VB4, SQL Server 6.5, RDO and ODBC

2. VB4/SQL Server 6.5 and Connections

3. Creating SQL Server tables 6.5 in VB4

4. ODBC Direct and SQL Server 6.5

5. ODBC Connect to SQL server 6.5

6. ODBC with SQL Server 6.5 in VB 4

7. Problems with ODBC drivers for SQL Server 6.5

8. ODBC and SQL Server 6.5 problem.

9. ODBC error after upgrading to Microsoft SQL server 6.5

10. VB4/SQL 6.5 and connections

11. ODBC problem through CR6 and SQL Server 6.5

12. SQL 6.5 and VB4 --Connection problem

 

 
Powered by phpBB® Forum Software