I've downloaded the connection string from a site on the internet and get an error message "Run-time error '91': Object variable or With block varible not set" when I try to execute the visual basic program when it tries to open the connection.
The following are the variables I've defined and the connection string:
Dim cmd As ADODB.Command
Dim rs As ADODB.Recordset
Dim SqlCode As String
Dim AS400_Conn As ADODB.Connection
AS400_Conn.Open "Provider=IBMDA400;" & _
"Data source=CDS;" & _
"User Id=JIM;" & _
"Password=mypassword;" & _
"Transport Product = Client Access" & _
"SSL=Default"
The error occurs on the open command. TIA!
The following are the variables I've defined and the connection string:
Dim cmd As ADODB.Command
Dim rs As ADODB.Recordset
Dim SqlCode As String
Dim AS400_Conn As ADODB.Connection
AS400_Conn.Open "Provider=IBMDA400;" & _
"Data source=CDS;" & _
"User Id=JIM;" & _
"Password=mypassword;" & _
"Transport Product = Client Access" & _
"SSL=Default"
The error occurs on the open command. TIA!