ADO cat.Procedures("qapp_Eps0304").Command won't execute.

  • Thread starter Thread starter GPO
  • Start date Start date
G

GPO

Hi All,

The following sub doesn't work anymore. It worked last
week and now it has stopped. The append query itself works
when you run it from the user interface. The parameters
look right. They seem to be getting picked up from the
form. The spelling of the query is right. But no data is
appended, and no error is generated. cnn, cat and cmd all
look right.

Sub AppendToEps _
(cnn As ADODB.Connection, cat As ADOX.Catalog)
'Appends new data to eps table
Dim cmd As ADODB.Command
On Error GoTo HandleError

Set cmd = cat.Procedures("qapp_Eps0304").Command
cmd.Execute , _
Array( _
Format(Forms![frm_Proc_Params]!
txtEp_From, "dd/mm/yyyy"), _
Format(Forms![frm_Proc_Params]!
txtEp_To, "dd/mm/yyyy"))

Exit Sub
HandleError:
MsgBox "Error appending to eps table." & vbCrLf & _
Err.Number & ": " & Err.Description
End Sub
 
Got it sorted. I stuck a * wild card in a filtering
criterion in the query. Wild cards are different in ADO...
 
Back
Top