S
stevens
I am trying to connect from an Access 2000 form to an SQL server 2000
database using ADO and the following code:
Private Sub cmdGetM2MData_Click()
Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
cn.Provider = "SQL Server"
cn.ConnectionString = "DSN = M2MSQL.dsn"
cn.Open
Set rs = New ADODB.Recordset
rs.Open "dbo_imbomm", cn, adOpenForwardOnly
rs.MoveFirst
Me.txtfpartno = rs!fpartno
Me.txtfcpartrev = rs!fcpartrev
End Sub
It compiles ok, but when executed, I always get the same error 3706
"Provider cannot be found. It may not be properly installed"
The error always occurs and stops on the cn.Open statement. I have created
the system DSN and testing shows it can successfully connect to the data
source. I have updated the MDAC on my Windows 2000 Pro workstation to 2.8.
Has anyone run across this problem and how do I solve it?
Thanks
Steve S
database using ADO and the following code:
Private Sub cmdGetM2MData_Click()
Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
cn.Provider = "SQL Server"
cn.ConnectionString = "DSN = M2MSQL.dsn"
cn.Open
Set rs = New ADODB.Recordset
rs.Open "dbo_imbomm", cn, adOpenForwardOnly
rs.MoveFirst
Me.txtfpartno = rs!fpartno
Me.txtfcpartrev = rs!fcpartrev
End Sub
It compiles ok, but when executed, I always get the same error 3706
"Provider cannot be found. It may not be properly installed"
The error always occurs and stops on the cn.Open statement. I have created
the system DSN and testing shows it can successfully connect to the data
source. I have updated the MDAC on my Windows 2000 Pro workstation to 2.8.
Has anyone run across this problem and how do I solve it?
Thanks
Steve S