|
-
Feb 2nd, 2007, 02:43 AM
#1
Thread Starter
Lively Member
How to Add, Edit, and Delete Data in MS Access DB?
What is the code I can use to add, delete, and edit data in the database?
I'm new in C# and I'm trying yo create a program that is capable of adding, editing, and deleting data in the database. I'm using MS Access as my database.
I don't know also how to browse the data stored. Can someone give me a code on how I can browse the data using a "Previous" and "Next" button?
To become a PROFESSIONAL,
Start from SCRATCH... 
-
Feb 2nd, 2007, 04:07 AM
#2
Frenzied Member
Re: How to Add, Edit, and Delete Data in MS Access DB?
everard:
I don't think you are going to find many people here who are going to write your project for you, but they will help you if you have problem with the code you write.
I would suggest that you download the "101 C# Samples" from the first listing in this Forum page. You will find a lot of sample code for database projects as well as a lot of other very useful information.
Good Luck
-
Feb 2nd, 2007, 06:50 AM
#3
Hyperactive Member
Re: How to Add, Edit, and Delete Data in MS Access DB?
First you have to create your Database, then create a connection from your program to the database. Finally, using that connection, send your SQL statements that will retrive, insert, delete or modify the data contained in the database.
Jennifer.
-
Feb 2nd, 2007, 07:05 AM
#4
Thread Starter
Lively Member
Re: How to Add, Edit, and Delete Data in MS Access DB?
I already have my database in MS Access and the connection was already done. My only problem is that I don't know how to add, edit, and delete records in the database. I also have the code for viewing the content of the database but I can't make it move from one record to another using the "Previous" and "Next" button. Thanks in advance.
To become a PROFESSIONAL,
Start from SCRATCH... 
-
Feb 2nd, 2007, 07:07 AM
#5
Re: How to Add, Edit, and Delete Data in MS Access DB?
As AIS4U said earlier, why don't you download the 101 samples?
-
Feb 4th, 2007, 09:45 PM
#6
Fanatic Member
Re: How to Add, Edit, and Delete Data in MS Access DB?
-
Feb 4th, 2007, 10:34 PM
#7
Lively Member
Re: How to Add, Edit, and Delete Data in MS Access DB?
In order to modifying your database, you should learn more about Command (such as InsertCommand, UpdatedCommand, DeletedCommand ) in DataAdapter. Like that
Code:
myConnection.myAdapter.UpdateCommand = new OleDbCommand(@"update tblUsers set [Name]=?,[Pass]=?, [Type]=? where [IdUser]=?", myConnection.myConn);
This Command is very important to control the database.
!Have fun!

-
Feb 9th, 2007, 04:49 AM
#8
Thread Starter
Lively Member
Re: How to Add, Edit, and Delete Data in MS Access DB?
Where will I place that code?
To become a PROFESSIONAL,
Start from SCRATCH... 
-
Feb 9th, 2007, 07:13 AM
#9
Re: How to Add, Edit, and Delete Data in MS Access DB?
There is no one code for data access. You should learn the principles from at least one tutorial and then apply those to your specific situation, asking for clarification from us on specific issues. Here's one such tutorial.
http://quickstart.developerfusion.co...wcontents.aspx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|