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
Wajid Usman
NA
34
10.5k
Delete in Local Database.
Jul 8 2014 3:19 PM
hi i am deleting a data in local database in c# visual studio but it gives an error in it. i have pasted here a function of deleting and a screen shot of error please help me to solve this.
public int drugDelete(string particulars)
{
try
{
string strCommand = "DELETE FROM IA WHERE Particulars='" + particulars;
SqlCeCommand cmdDelete = new SqlCeCommand();
cmdDelete.Connection = conn;
cmdDelete.CommandType = CommandType.Text;
cmdDelete.CommandText = strCommand;
return cmdDelete.ExecuteNonQuery();
}
catch (SqlCeException e)
{
MessageBox.Show(e.Source + "\n" + e.Message + "\n" + e.StackTrace);
return -1;
}
}
Attachment:
error.rar
Reply
Answers (
3
)
Drawing line on chart area
Sharepoint add item to list using c#