Hi Robin.
>How do I make structure changes to the tables in a database on an end users file server programmatically?
>
>How do I add a table to the database in my development enviroment & update the users data enviroment without losing any of the records already in there.
Check out Stonefield Database Toolkit (SDT) at
www.stonefield.com. It automates both of these tasks, and many others as well, including repairing corrupted table and memo headers and recreating corrupted indexes.
>I do I change the drive letter/path of a dataenviroment (I presume its embedded in there somewhere?
Change the Database property of a Cursor object in the DataEnvironment. For example, you can use code like this in the BeforeOpenTables method of the DE:
for each loObject in This.Objects
if upper(loObject.BaseClass) = 'CURSOR'
lcDatabase = loObject.Database
if empty(lcDatabase)
lcTable = loObject.CursorSource
loObject.CursorSource = forcepath(lcTable, lcDirectory)
else
loObject.Database = forcepath(lcDatabase, lcDirectory)
endif empty(lcDatabase)
endif upper(loObject.BaseClass) = 'CURSOR'
next loObject
This code assumes the directory for the data is in lcDirectory.
Doug