February 24, 2009 at 11:29 am
I have the following code which calls from querydef my store procedure in the SQL server which deletes records in the table, the code runs fine,but not doing anything, what I am missing? Thank you
Dim qdf As DAO.QueryDef
Dim strConnect As String
Dim ConnectStr As Variant
'Delete records from tblCust
Set qdf = CurrentDb.QueryDefs("qryDeletetblCust")
If IsMissing(ConnectStr) Then
strConnect = qdf.Connect
Else
strConnect = CStr(ConnectStr)
End If
qdf.SQL = sqlstatment
February 24, 2009 at 11:40 am
I haven't done access programming in years, but just looking at it, I don't see where you have given a command to actually execute the stored proc. Can you check for possible other commands once you have set the definition?
Lee
February 24, 2009 at 11:43 am
it is exuciting inside of the querydef
February 24, 2009 at 11:52 am
So try a qdf.Execute and see if it gives you option. qdf won't run by itself I don't believe.
Lee
February 24, 2009 at 11:58 am
Thank you it worked
February 24, 2009 at 12:03 pm
np
Take care
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply