DataSet

  • Thread starter Thread starter Rodrigo
  • Start date Start date
R

Rodrigo

Thanks Paul for your help.

I have more questions.

I've created a database using sql server CE in a MS Pocket PC device.
My database has a lot of tables and I have to make an app that provide user
to fill it offline.

The user has to choose the customer in a combobox and then the system show
all the data in some objects like textbox and combox, etc. But, the data has
come by a lot of tables and the user has to change it.

How is the best way to do this?

Using DataSet?
Using SQLCEDataAdapter?
Using SQLCEDataReader?

Thanks for any help.
 
I'm pretty sure I don't understand the question. If you are asking, how
should you display tabular data, I'd say a DataSet and a DataGrid, as my
query sample code did. If this application has only one job: populating the
database, then you can ask the user questions or whatever you want to get
the data values...

Paul T.
 
Rodrigo:

Those three objects are used for different things. If you want 'bound'
controls then using an Adapter in conjunction with a Dataset sounds like the
best option. In general you can add stuff to a control that has complex
binding (ie combobox, listbox, grid) with a Reader item by item. But if you
have relations and want to implement master/detail scenarios, then a reader
probably isn't the way to go. It can be but usually it's more hassle than
it's worth.

If you have all of those tables, a Dataset with multiple tables and
corresponding dataRelation objects is probably going to be your best bet.
Also, if ou use datasets you can get your data from a WS, XML File, SQL
SErver db or CE Db. If you ues a SqlCeReader, you only will be able to get
at it from that point. Again not too big of a deal b/c the db is local, but
it's worth noting.

HTH,

Bill


Rodrigo said:
Thanks Paul for your help.

I have more questions.

I've created a database using sql server CE in a MS Pocket PC device.
My database has a lot of tables and I have to make an app that provide user
to fill it offline.

The user has to choose the customer in a combobox and then the system show
all the data in some objects like textbox and combox, etc. But, the data has
come by a lot of tables and the user has to change it.

How is the best way to do this?

Using DataSet?
Using SQLCEDataAdapter?
Using SQLCEDataReader?

Thanks for any help.

--
W.G. Ryan MVP Windows - Embedded

http://forums.devbuzz.com
http://www.knowdotnet.com/dataaccess.html
http://www.msmvps.com/williamryan/
 
Dears Paul and Wilian,

I think the DataGrid is not gonna work very well for me, because there are a
lot of tables to fill. I have a big form and some master \ details on it.
I don't have experience with C# and I've tryed to understand these objects
and the best way to use them.
After you sent me the examples, I could make good changes in my code. Now I
can fill a DataSet and bind controls with the data.

Now, I have problems to change the data.
I´ve set the UpdateCommand() and I'm using the EndEdit() and AcceptChanges()
but I can't apply the changes to the database.

The is no error messages, but the changes doesn't apply on the db.

Thanks for your help.

Rodrigo.
 
Back
Top