SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 5th, 2001, 03:17 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Difference B/W Command and DataSetCommand in ADO.NET

<i><b>Originally posted by : Deepak Kashyap (deepkash@yahoo.com)</b></i><br />From a few articles which i have read i have understood that to update the database we have two methods.<br />the first one is through the command object:<br />Dim SQlStmt As String = "UPDATE Customers SET Age=20 WHERE ID=2"<br />Dim myCommand As ADOCommand = New ADOCommand(SQLStmt, myConnection)<br /><br />the second one is through the datasetcommand<br /><br />Dim workDS As DataSet = New DataSet("myDataSet")<br />Dim workDSCMD As ADODataSetCommand = New ADODataSetCommand _<br />("SELECT * FROM Customers", _<br />"Provider=SQLOLEDB.1;Initial Catalog=Northwind;" & _<br />"Data Source=MyServer;User ID=sa;")<br />workDSCMD.FillDataSet(workDS, "Customers")<br />' Make some changes to the customer data in the DataSet.<br />workDSCMD.Update(workDS, "Customers")<br /><br />

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Difference B/W Command and DataSetCommand in ADO.NET


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT