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
Mohammed Shamsheer
NA
5
12.7k
System.Data.SqlClient.SqlException: Incorrect syntax near '
Aug 21 2012 4:38 AM
SqlConnection con = new SqlConnection("Data Source=APPLE;Initial Catalog=sam;Integrated Security=True");
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
con.Open();
string str1 = "DELETE * FROM AU_Delete";
cmd.CommandText = str1;
cmd.ExecuteNonQuery();
con.Close();
This is my coding for delete button it's showing error :
Exception Details:
System.Data.SqlClient.SqlException: Incorrect syntax near '*'.
what is the problem in my coding?
Reply
Answers (
3
)
Command.Cs
MyPayslips