I am able to open the connection but I get an error trying to open the recordset.
I want to just pass a SQL string and set a recordset to it.
here is my code
Dim Conn2 As ADODB.Connection, rst As Recordset, SQLcode2 As String
Set Conn2 = New ADODB.Connection
Conn2.Open "Provider=MSDASQL.1;Persist Security Info=False;Data Source=COMPX;"
SQLcode2 = "Select SALES_ORDER, CUSTOMER FROM none_SO_MASTER_HDR Where SALES_ORDER = '" & Ordernum & "';"
' Open Employee table.
Set rst = New ADODB.Recordset
rst.CursorType = adOpenKeyset
rst.LockType = adLockOptimistic
rst.Open "none_SO_MASTER_HDR", Conn2, , , adCmdTable '
< Error here
Run time error -2147217887 (80040e21)
ODBC driver does not support the requested properties
TIA DougP, MCP
Visit my WEB site to see how Bar-codes can help you be more productive
I want to just pass a SQL string and set a recordset to it.
here is my code
Dim Conn2 As ADODB.Connection, rst As Recordset, SQLcode2 As String
Set Conn2 = New ADODB.Connection
Conn2.Open "Provider=MSDASQL.1;Persist Security Info=False;Data Source=COMPX;"
SQLcode2 = "Select SALES_ORDER, CUSTOMER FROM none_SO_MASTER_HDR Where SALES_ORDER = '" & Ordernum & "';"
' Open Employee table.
Set rst = New ADODB.Recordset
rst.CursorType = adOpenKeyset
rst.LockType = adLockOptimistic
rst.Open "none_SO_MASTER_HDR", Conn2, , , adCmdTable '
< Error here
Run time error -2147217887 (80040e21)
ODBC driver does not support the requested properties
TIA DougP, MCP
Visit my WEB site to see how Bar-codes can help you be more productive