Reputation: 663
I have a SQL Express database that I am trying to connect with using C# to SELECT, INSERT, and DELETE using a DataSet.
Can anyone point me in the direction of a good tutorial on how to do this? I have a simple database consisting of 2 tables, with a one-to-many relationship and a foreign key relationship.
I found the following on the MSDN website:
http://msdn.microsoft.com/en-us/library/bb655884(v=vs.90).aspx
I made some slight modifications to the above for use with Visual Studio 2010, but was unable to figure out how to use the DataSet once I created the datasource. The dataset.xsd
and dataset.designer.cs
files are added to the project upon completion of the wizard, but I can't figure out how to create a DataSet object and use it to talk to my SQL Express database.
Upvotes: 1
Views: 6309
Reputation: 52290
try this one: Working with Datasets in Visual Studio there should be everything you need step for step. You can find everything you need to access the data with the generated DataAdapter here: Populating a Dataset from a DataAdapter
Finally here is a complete Walkthrough
If you post some of your code I can try to help you further.
Upvotes: 1