Subscribe to Subscribers

Online Members

Shine S
More...

Forums » .NET » .NET »

send query for update and delete


Posted Date: 11 Jan 2008      Posted By:: madhu     Member Level: Bronze    Member Rank: 0     Points: 2   Responses: 1



Hi,

I am using sql server 2005 with c# 2008.i know the code for update and delete in sql structure..I don't know the format of using this code in c#..send me the syntax of using query for update and delete in c#

Thanks




Responses

#178542    Author: KVGaneshBabu      Member Level: Gold      Member Rank: 126     Date: 12/Jan/2008   Rating: 2 out of 52 out of 5     Points: 2

You are asking commandtext property of commandtype


sqlcmd.CommandType = CommandType.Text;
sqlcmd.CommandText = "Update Table1 set Field1 = '" + txtfield1.Text +"' where Id = '" + txtid.text +"'";


 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : send query for update and delete
Previous : send query for update and delete
Return to Discussion Forum
Post New Message
Category:

Related Messages

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Talk to Webmaster Tony John
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2013 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.