[.net] Adding a column to an Access database in c#
Hello. Im sending out an update for some software ive been developing and the update needs a new column added to an access database on the user's computer. Im not real good with access databases yet so i cant figure out how to do this. Ive tried making a new column then using dataset.datatable.Columns.Add(columnName); but when i call the update method and check the database it did not update the .mdb file. Can someone give me a small code snippet to show how this is correctly done? Thanks for your help.
Have you tried just doing an alter table query? just do a query like:
ALTER TABLE tablename ADD COLUMN new_column TEXT(25);
using the same function you would use to do a select query.
Greetings.
ALTER TABLE tablename ADD COLUMN new_column TEXT(25);
using the same function you would use to do a select query.
Greetings.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement