Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> ODBC Help
Here is my problem.
I'm trying to execute a select query using DAO in VBA.
Private Sub test()
Dim dbs As DataBase, rst As Recordset
Dim strsql, strconnect As String
strconnect = "ODBC;DSN=PROD;"
Set dbs = OpenDatabase("", dbDriverPrompt, False, strconnect)
strsql = "Select * from dct_test;"
Set rst = dbs.OpenRecordset(strsql, , dbSQLPassThrough) <== This is
where is bombs.
End Sub
I keep getting the error microsoft jet can't find the table or query
'username.dct_test'.
I know that the table is there because I can insert into it from code.
IE
strsql = "Begin Insert into DCT_TEST (TEST) values ('Test'); End;"
dbs.execute strsql, dbsqlPassThrough
All I really want to do is populate a DB Grid with the results from my
recordset.
What am I doing wrong.
My VBA Skills are OK but I'm a DBA trying to code so you will have to
excuse me if my code looks a bit funny.
Any help would be great.
TIA, Terry Received on Fri Aug 27 1999 - 14:44:34 CDT
![]() |
![]() |