|
I'm having trouble finding a suitable example for my problem.
I have a table (MS Acces Database) which I would like to load whatever structure (fields, no data) I have on it into memory. Once the structure is in memory, I want to check which fields are available and if I need to add new fields, I would like to add them to the table. Finally, I want to save these changes (eg. when I open the Access file, the table's structure has been updated with these new fields). Is this way too complicated, or is it doable I myself (beginner/intermediate-level programmer) cannot figure out how to save changes to the table's structure. I could use some help from the DB gurus.
|
|
Hi,
To change the structure of a table you can use the "ALTER TABLE" sql statement to modify the table in sql server.
http://msdn2.microsoft.com/en-us/library/ms190273.aspx
Also, you can try using ADOX. Although its an old technology you can still use it in .Net. ADOX is an ADO extension made for the sole of changing the schema of a certain table or database...
http://msdn.microsoft.com/library/default.asp url=/library/en-us/ado270/htm/admscadoxfundamentals.asp
cheers,
Paul June A. Domag
|