Background:
New to SQL
Front end - MS Access 2010
Back end - MS SQL Server 2008
_______________ _______________ __
How is the best way to check if a SQL command works? For example:
Can I insert some code to see if the command worked or not? It would be beneficial to display an error code or something via a MsgBox.
Thanks in advanced for you help.
New to SQL
Front end - MS Access 2010
Back end - MS SQL Server 2008
_______________ _______________ __
How is the best way to check if a SQL command works? For example:
Code:
zSQL = _
"INSERT INTO [dbo_DB02001] " & _
"(status,statusdate, buyer, supplier, mdDateTime, dWho,mdAction)" & _
" VALUES(" & _
"'" & Status & "'" & _
", '" & StatusDate & "'" & _
", '" & Me.fBuyer.Value & "'" & _
", '" & Me.fSupplier.Value & "'" & _
", '" & mdDateTime & "'" & _
", '" & gblUser & "'" & _
", '" & mdAction & "')"
'Debug.Print zSQL
DoCmd.SetWarnings False
DoCmd.RunSQL zSQL
Thanks in advanced for you help.
Comment