Tutorials
Resources
Forum
Reviews
Communities
Interview
Jobs
Projects
Training
Your
Ad
Here
Silverlight Games
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Polls
|
Revenue Sharing
|
Lobby
|
Gift Shop
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
srinivas kante...
(67)
Alwyn
(62)
Abhisek Panda
(42)
Last 7 Days
Alwyn
(726)
nishithraj
(512)
Gaurav Arora
(503)
more...
Resources
»
Articles
»
Databases
»
Inserting a Record in a table using ADO.NET Dataset
Posted Date: 20 Nov 2008
Resource Type:
Articles
Category:
Databases
Author:
mahendrakiran
Member Level:
Gold
Rating:
Points
: 8
To insert a record in the data table, you create an object of the DataRow using the DataTable object. Then you set the appropriate field values and finally add it to the DataTable’s Rows collection.
The Following is the code written in C#.NET:
DataTable dt = ds.Tables["Article"];
// Insert
DataRow dr = dt.NewRow();
dr[0] = 4;
dr[1] = "MFC Programming";
dr[2] = "VC++ MFC Library";
dr[3] = 3;
dr[4] = 3000;
dr[5] = DateTime.Parse("20/11/2008");
dt.Rows.Add(dr);
da.Update(ds, "Article");
ds.AcceptChanges();
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
to add tags.
(No tags found.)
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
Command Bulider Object prepares to update commands in Dataset
Previous Resource:
Issues related to the deployment of data access application
Return to Discussion Resource Index
Post New Resource
Category:
Databases
Post resources and
earn money
!
More Resources
Command Bulider Object prepares to update commands in Dataset
Find all Procedures in a Database
Find all database names in a SQL Server instance
Find all tables that have columns with an identity property
Find all columns in a table that are computed columns
SQL Server Optimization Tips
dotNet Slackers
About Us
Contact Us
Privacy Policy
Terms Of Use