TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
AMITKUMAR GUPTA
NA
3
618
Got error "Syntax error in INSERT INTO statement".
Jan 8 2018 6:12 AM
OleDbCommand cmd = new OleDbCommand();
cmd.CommandText ="insert into clientloan (ClientId,name,addr,phone,email,amount,start_date,end_date,installment,month,perins) values (@ClientId,@name,@addr,@phone,@email,@amount,@start_date,@end_date,@installment,@month,@perins )";
cmd.Connection = con;
cmd.Parameters.Add("@ClientId", OleDbType.VarChar).Value = textBox7.Text.Trim() ;
cmd.Parameters.Add("@name",OleDbType.VarChar).Value = textBox2.Text.Trim();
cmd.Parameters.Add("@addr",OleDbType.VarChar).Value = textBox3.Text.Trim();
cmd.Parameters.Add("@phone",OleDbType.VarChar).Value = textBox4.Text.Trim();
cmd.Parameters.Add("@email", OleDbType.VarChar).Value =textBox5.Text.Trim();
cmd.Parameters.Add("@amount",OleDbType.VarChar).Value = textBox1.Text.Trim();
cmd.Parameters.Add("@start_date",OleDbType.VarChar).Value = dateTimePicker1.Text.Trim();
cmd.Parameters.Add("@end_date", OleDbType.VarChar).Value =dateTimePicker2.Text.Trim();
cmd.Parameters.Add("@installment",OleDbType.VarChar).Value = textBox9.Text.Trim();
cmd.Parameters.Add("@month",OleDbType.VarChar).Value = textBox6.Text.Trim();
cmd.Parameters.Add("@perins",OleDbType.VarChar).Value = textBox8.Text.Trim();
cmd.ExecuteNonQuery(); //Error occured here.
con.Close();
MessageBox.Show("Loan details Inserted Succesfully here");
Reply
Answers (
2
)
how to append header and footer exiting PDF.
Receive sms message through Modem