AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 sample programe with code & design
Posted by Bhawana on  5/28/2010 11:33:21 PM Category: Asp.Net 2.0
Add to my favorites
Email to friend
a simple program of insert, delete, update in asp.net , connecting with oledb

thanks

Post Your Reply Post New Question

 Viewer's Reply
Insert, Update, Delete using Oledb
Answered By Moderator1 on 5/29/2010 10:04:36 PM
Hi,

Below I'm provide some sample code to use OledbCommand object. Please change the insertSQL query according to your requirement.

string insertSQL="Insert into TableName values ('"+ Value1 +"', '"+ Value2 +"')"
OleDbConnection myConnection = new OleDbConnection("YourConnectionString");
OleDbCommand myCommand = new OleDbCommand(myExecuteQuery, myConnection);
myCommand.Connection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition - Free 207 Page Preview!
Sexy Web Design - Free 71 Page Preview!
Simply JavaScript - Free 150 Page Preview!