I'm trying to make a simple program thats adds, updates, deletes and finds records using MS Access and OleDb.
Do I need a DataSet or just a DataTable?
How to proceed?
Thanks.
Printable View
I'm trying to make a simple program thats adds, updates, deletes and finds records using MS Access and OleDb.
Do I need a DataSet or just a DataTable?
How to proceed?
Thanks.
You better read about the ADO.NET data model before starting. and for your application i think you need that. actually datasets can be considered as a kind of containers of data tables.
You don't need a dataset to do any of that, but depending on what you are doing you may need one to store the data you retrieve from your DB.
As far as finding data, if you want a quick forward only way to read data then you can use a data reader. Otherwise you will need a data set.
You only need a connection and a command object to execute Sql DML statements that return no data.
If you are doing updates, deletes and such, then a DataSet is the way to go.Quote:
Originally posted by AlvaroF1
I'm trying to make a simple program thats adds, updates, deletes and finds records using MS Access and OleDb.
Do I need a DataSet or just a DataTable?
How to proceed?
Thanks.
You are right. I'm using only a connection, a command and a datareader object to add, find, update and delete records.Quote:
Originally posted by munsworth
You don't need a dataset to do any of that, but depending on what you are doing you may need one to store the data you retrieve from your DB.
As far as finding data, if you want a quick forward only way to read data then you can use a data reader. Otherwise you will need a data set.
You only need a connection and a command object to execute Sql DML statements that return no data.
Thanks.