Problem with a readonly table in a dataset (data source) in VS 200

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a data source that point to an Access database with 3 tables in it.
My problem is that the tables are designated read only and I don't know how
to change the setting so I can copy data to them. I can see the public
property in the config file but I am new to Visual Studio 2005 and don't know
how to fix my problem.
 
Cathy - just so I understand, the tables in Access are Read Only? One thing
you may want to do (b/c if they are read only, you might break something
else by enabling them assuming the original developer had a reason to make
them read only).

Copy the schema of the tables to a new table. THen, configure the
dataadapter's select command to point to the source table. Now, configure
the adapter so that the INsert/Delete commands point to the new tables. Set
the AcceptChangesDuringFill property to false and fill your datatable.
Then, using the second adapters, call Update on them passing in the dataset
you created in the first step. This will cause all of the rows to be
inserted into the new table. THen you'll have the original talbe in Read
Only format as well as a set of data you can work with.

HTH,

BIll
 
Thansk Bill that helped quite a bit. If I can figure out how to rate this, I
give you 2 thumbs up.
 
Back
Top