currentdb.execute returns error "cannot execute a select query"
Posted on 2004-08-23
I am using an MS Access front end to Oracle. My append and update queries to Oracle are running horrendously slow so I'm trying the advice I have found in here at EE. The following code is what I am trying, exactly as I have it in my module. Any help suggestions? It bombs on the command "currentdb.execute" with an error "cannot execute a select query":
Dim qd As QueryDef
Dim rs As DAO.Recordset
Set qd = CurrentDb.QueryDefs("jshq_update_ldtext_oracle")
Set rs = CurrentDb.OpenRecordset("jsht_LONG_DESCRIPTION")
While Not rs.EOF
qd.SQL = "INSERT INTO JSHL_WO_LD_TEST (WONUM, LDKEY, LDTEXT, REPORTDATE) _
VALUES ('" & rs(0) & "', '" & rs(1) & "', '" & rs(2) & "', '" & rs(3) & "');"