Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
6
Reply
Missing semicolon (;) at end of SQL statement
Nel
Oct 19 2011 4:38 AM
2.9k
Reply
Hello,
I have delete function and it doesn't function. I got this error:
"Missing semicolon (;) at end of SQL statement." even though I have a semicolon sign at the end of that statement.
Here is my code:
try
{
OleDbCommand commandbrisi = new OleDbCommand();
commandbrisi.CommandText = "Delete from Kazneti where Imeprezime = ? and Adresa = ? order by Rbr asc";
commandbrisi.Parameters.AddWithValue("@imeprez", txtImePrez.Text);
commandbrisi.Parameters.AddWithValue("@adresa", txtAdresa.Text);
commandbrisi.Connection = conn;
conn.Open();
OleDbDataAdapter oleDBDataAdapter1 = new OleDbDataAdapter(new OleDbCommand("Update * from Kazneti", conn));
commandbrisi.ExecuteNonQuery();//here is the error
_dataset.Clear();
oleDBDataAdapter1.Fill(_dataset, "Kazneti");
}
finally
{
conn.Close();
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
File Management in ASP.NET C#
Dynamically generate Textbox in Repeater control and i have to validate