* New table to be kept in pos database
SET DATABASE to pos
* Create the new table and indexes
CREATE TABLE Data\paykeys ( ;
cbuttonid c(15) DEFAULT "", ;
ctype c(10) DEFAULT "", ;
ctopdesc c(15) DEFAULT "", ;
cmiddesc c(15) DEFAULT "", ;
cbotdesc c(15) DEFAULT "", ;
lvisible l DEFAULT .f., ;
lauthorize l DEFAULT .f., ;
namount n(11,2) DEFAULT 0.00, ;
cunique c(12) DEFAULT "", ;
tlastmod t DEFAULT DATETIME(), ;
crecstatus c(1) DEFAULT "A", ;
ceditid c(10) DEFAULT "", ;
ceditws c(10) DEFAULT "")
SELECT paykeys
INDEX ON ALLTRIM(ctype) TAG xtype
INDEX ON ALLTRIM(cbuttonid) TAG xbuttonid
INDEX ON TTOC(tlastmod,1) TAG XLASTMOD
INDEX ON cunique TAG XUNIQUE
This is the section of code from the database update program I created where im adding the table. I then populate the table and the update is over. The tables and databases were opened exclusively using stonefields opendata method.
After the update is run through a maintenance program I then call stonefields validate method. This is done via another maintenance form used only for stonfield..It allows us to repair, reindex, validate accordingly.
The section of code that calles validate is as follows.
oMeta.oSDTMgr.OpenData(ldbname, .T.) where ldbname is pos
oMeta.Validate()
After this is done i close out of the program...when opendata is called in the startup routine it gives an error message saying the backink is missing and must be repaired...
If i dont call the validate method and shut down the program. I can launch the program go into the file maintenacne program...select the newly added table and browse / modify structure and it works fine with no errr messages being displayed.
Thx for the input
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only