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
Ankita Ankita
NA
11
28k
C# code to drop a table?
Mar 12 2012 4:35 AM
In following if condition is getting false n control jumps to else. Is my condition wrong? I get o/p as "Table is not dropped". what value is returned by executenonquery method for drop table?
con is object of sqlconnection.
cmd is object of sqlcommand
con.open();
string str=" Drop table temp";
cmd= new SqlCommand(str,con);
int r=cmd.executenonquery();
if(r>0)
{
messagebox.show("Table is dropped");
}
else
{
messagebox.show("Table is not dropped");
}
Reply
Answers (
2
)
Passing value between form in windows form
Creating Webservices to send Messages to Peoplesoft