Hi all,
I have a log table where i need to insert the query which causes errors in the code. I have a common function "WritetoLog".
Catch ex As Exception
writetolog(ex)
End Try
My Question is from the ex how do i take the query which causes error.
eg. If the insert command is giving exception i should get like this
SQL Query causes error : Query + ex.Message
SQL Query causes error : Insert into temp("1",'Anitha','TeamLeader',) + Incorrect syntax near ')'
Please help me. Thanks in advance.
Regards Nilofar