MySql with .Net
I m using .Net(2.0) with MySql 5.0. When I execute following command using ExecuteNonQuery() it throws excepiotn but this query works well when I execute in MySql Query Browser.
"Insert into SYN_TLog(LogId,ClientId,LogDate,LogDirection,ToCli ent,FileName,FilePath,FileCount,EnteredOn) Values(1,'1',str_to_date('09/04/2007 09:31:29 AM','%d/%m/%Y %h:%i:%s %p'),'I','0002','0001-Log-060407010600PM.xml','C:\\Synchronizer\\Inbox\\UnPo sted\\',1,str_to_date('09/04/2007 09:31:29 AM','%d/%m/%Y %h:%i:%s %p'))"
EXCEPTION
" ERROR [23000] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '09/04/2007 01:48:57 PM','%d/%m/%Y %h:%i:%s %p'))' at line 1 ".
Please help me to solve this problem.
__________________
Regards,
Ali Irfan
|