I am trying to get a connection to a SQL Server database using
VB4 through ODBC. This is the error I get:
Connection failed:
SQLState: 'S1000'
SQL Server Error: 1157
[Microsoft][ODBC SQL Server Driver]Unable to load communication
module. Driver has not been correctly installed.
Connection falied:
SQLState: '08001'
SQL Server Error: 0
[Microsoft][ODBC SQL Server Driver]Unable to connect to data
source
I have reinstalled the ODBC Driver and had no luck.
Here is the code that causes the error:
Public strConnect As String
Public mrdoEnv As rdoEnvironment
Public mrdoConn As Object
Public mbEnvOpen As Integer
Public mbConnOpen As Integer
Sub main()
rdoEngine.rdoDefaultCursorDriver = rdUseOdbc
Set mrdoEnv = rdoEngine.rdoCrea{*filter*}vironment("", "sa", "")
Set mrdoConn = mrdoEnv.OpenConnection("NCHFA",
rdDriverPrompt, False, "") 'This is the line that causes the
problem
--
David Coulter