|
-
March 12th, 2005, 12:35 PM
#1
I need a good tutorial
I need a good tutorial on how to make a windows application on add, edit, update, delete records in a database. If you could list any website that has great tutorial on C#.
Thanks
-
March 12th, 2005, 03:21 PM
#2
Re: I need a good tutorial
You can do this multiple ways, I dont know of any tutorials. But I can try and nudge you in the right direction.
Method 1.
- Use a datagrid, a binded datagrid to your database will update all changes made, so hence additions, modify and delete will all work.
Method 2.
- Use Command Objects.
I have a class which has the following methods:
Open() - opens the connection
Close() - closes the connection
RetrieveDataSet() - creates a dataset and returns it
Update(strSQL) - accepts the string puts it in a command and use
ExecuteNonQuery()
Remove(strSQL) - same as above
Add(strSQL) - use execute here instead.
If you need help with this method I can help when I get back to work on monday if thats too late sorry 
Method 3
- work directly with a dataSet
You can do add/remove and modify to the dataSet directly and then sync up with the DB upon close of your app
Here these links might help
http://www.codeproject.com/cs/database/
In particular for you:
This one got me started awesome, and has a second part at the bottom with even more help.
http://www.codeproject.com/cs/databa...ithAdoNet1.asp
This one is good too.
http://www.codeproject.com/cs/databa...onaladonet.asp
Just remember the command Objects etc all have dif names depending on the Database your connecting too.
OleDbCommand is for say Access
there is also SQL and ODBC and some others im sure.
Good luck
Will Rate Posts for help!
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
|