I am getting the following error with the code below:
"Error 430 Class does not support Automation or does not support expected interface"
I have used this code in many VB6 programs, and never had a problem until a few days ago (I am now having the problem on a Customer's Windows XP workstation and on my own Windows Virtual XP)
Does anyone know what to do to resovle this ?
Option Explicit
Private mconMas90 As New ADODB.Connection
Private mstrMas90CompanyNumber As String
Private Sub COMMAND1_CLICK()
On Error GoTo ErrorHandling
mstrMas90CompanyNumber = "ABC"
With mconMas90
.Mode = adModeShareDenyNone
.CursorLocation = adUseClient
.ConnectionString = "Provider=MSDASQL.1;COMPANY=" & mstrMas90CompanyNumber & ";" & "Password=sunbelt2004;Persist Security Info=True;User ID=sunbelt;Data Source=SOTAMAS90"
.Open
End With
MsgBox "OPENED OK"
mconMas90.Close
Exit Sub
ErrorHandling:
MsgBox "Unexpected error in OpenMas90: " _
& "Error " & Err.Number _
& " " & Err.Description
Exit Sub
End Sub
"Error 430 Class does not support Automation or does not support expected interface"
I have used this code in many VB6 programs, and never had a problem until a few days ago (I am now having the problem on a Customer's Windows XP workstation and on my own Windows Virtual XP)
Does anyone know what to do to resovle this ?
Option Explicit
Private mconMas90 As New ADODB.Connection
Private mstrMas90CompanyNumber As String
Private Sub COMMAND1_CLICK()
On Error GoTo ErrorHandling
mstrMas90CompanyNumber = "ABC"
With mconMas90
.Mode = adModeShareDenyNone
.CursorLocation = adUseClient
.ConnectionString = "Provider=MSDASQL.1;COMPANY=" & mstrMas90CompanyNumber & ";" & "Password=sunbelt2004;Persist Security Info=True;User ID=sunbelt;Data Source=SOTAMAS90"
.Open
End With
MsgBox "OPENED OK"
mconMas90.Close
Exit Sub
ErrorHandling:
MsgBox "Unexpected error in OpenMas90: " _
& "Error " & Err.Number _
& " " & Err.Description
Exit Sub
End Sub