ADO VB6 Access97 Unable to run Access Query -2147217900 
Author Message
 ADO VB6 Access97 Unable to run Access Query -2147217900

Dim cnn1 As ADODB.Connection
Dim rs1 As ADODB.Recordset
Dim strCnn As String

strCnn = "Provider = Microsoft.Jet.OLEDB.3.51;" & _
         "Persist Security Info=False; Data Source=C:\Mydir\my.mdb"
Set cnn1 = New ADODB.Connection
cnn1.Open strCnn
Set rs1 = New ADODB.Recordset
    rs1.CursorType = adOpenKeyset
    rs1.LockType = adLockOptimistic
    rs1.Open "[qryrob]", cnn1, , , adCmdText

The result is:
-2147217900  The command contained one or more errors

All I am trying to do is run a query that already exists in an Access97
mdb.  Other people edit the query often so I do not want to put the
"Select etc" in my code.  I am not using DSN or ASP.  

If you can find fault with this code please let me know




Fri, 19 Jul 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ADO VB6 Access97 Unable to run Access Query -2147217900

2. ADO VB6 Access97 Unable to run Access Query -2147217900

3. VB6 ADO Simplebound Class: Unable to change query

4. VB6,Access97,ADO - Update query doesn't update all records

5. Run-time error -2147217900

6. Run time error -2147217900

7. Run-Time Error '-2147217900 (80040e14)';

8. ADO Error -2147217900 (800040e14)

9. ADO Error -2147217900 (800040e14)

10. How to get the real db error when duplicate row in oracle using ado -2147217900

11. Please Help! ADO ERORR -2147217900

12. Runtime Error 2147217900 ODBC with Access

 

 
Powered by phpBB® Forum Software