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
Nel
NA
716
1.1m
Problem with update of the record
Oct 20 2011 3:02 AM
Hi,
Could anybody help me please and tell me what's wrong with my code? Here it is:
OleDbCommand command = new OleDbCommand();
command.Connection = conn;
command.CommandText = "Update Kazneti set Imeprezime=?, Adresa=?, Datumstar=? where Rbr=?";
command.Parameters.AddWithValue("@imeprez", txtImePrez.Text);
command.Parameters.AddWithValue("@adresa", txtAdresa.Text);
command.Parameters.AddWithValue("@datn", txtDatumnov.Text);
command.Parameters.AddWithValue("@rbr", comboBox1.SelectedValue);
try
{
conn.Open();
OleDbDataAdapter oleDBDataAdapter1 = new OleDbDataAdapter(new OleDbCommand("Select * from Kazneti order by Imeprezime asc", conn));
_dataset.Clear();
oleDBDataAdapter1.Fill(_dataset, "Kazneti");
command.ExecuteNonQuery();//I got en error "Data type mismatch in criteria expression." here
}
Thank you.
Reply
Answers (
4
)
Access database file through your application
How to add the paragraph indent level value to the link list