ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.0.77-log]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 'InsertProcedure' at line 1
drop procedure if exists insert_pdf_data; delimiter # create procedure insert_pdf_data ( in BatchName varchar(20), in ClientNm varchar(30) ) begin insert into PdfEntry (BatchName,ClientNm) values (BatchName,ClientNm); end# delimiter ;
try { con = new OdbcConnection("DRIVER={MySQL ODBC 5.1 Driver};SERVER=192.168.0.10;DATABASE=PDF_Data;UID=heman;PASSWORD=harjeet;OPTION=3"); con.Open(); cmd = new OdbcCommand("insert_pdf_data", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@BatchName", DDBatch.SelectedValue.ToString()); cmd.Parameters.AddWithValue("@ClientNm", DDClient.SelectedValue.ToString()); cmd.ExecuteNonQuery(); con.Close(); Response.Write("<Script>alert('Data added successfully')</Script>"); } catch (Exception err) { } finally { con.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)