Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restructure Tables 1

Status
Not open for further replies.

mrohde

Programmer
Jul 5, 2001
2
AU
I want to restructure a table Via code in delphi and add one additional Field, is there a API call I can make that will update the DdF and add the additional Field into the table?
 
Depending on the interface you are using, it may be possible to adda field. If you are using the Btrieve API, there's really isn't a way to add a field to the file without recreating the file but even that can be done in code. However, this wouldn't update the DDF. You might be able to use DTI or DTO to recreate the entry in the DDF though. If you are using ODBC, you should be able to use an Alter Table statement to add a field and that would update the DDF.
 
Thanks. I had thought to create a table with the additional field, ship the DDF with the required definitions for the new structure then dump all the information into the new table and later rename the table. I had hoped for an easier solution.... ah well thats the life of a programmer...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top