Click here to Skip to main content
15,921,793 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i get error descriptions of mysql in a file??
I fire a insert query from asp.net using C# & if there is some problem i want those error or informations in a file which had occured during executing this query.

For Example:-
Information displayed in mysql while inserting data as:
! Incorrect integer value: 's54' for column 'state_id' at row 2.
! Data truncated for column 'dstatus' at row 2.

I want this two mysql information in a file.
Posted

1 solution

You need to catch the error with a Try, Catch, Finally Block and then
log the error to a text file making sure to record the StackTrace and InnerException.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900