Altering table
jda
jda at his.com
Sat Jul 2 13:53:18 CDT 2005
Hi Ruslan,
I'm trying to deal with these exceptions fc13 throws when the tables
don't match the API exactly.
I'm trapping the exception and trying to alter the table (to make a
field NOT indexedbywords). But it is not altering the database!
Here is the code. What am I doing wrong?
try
localFormatDB.open(formatFolderItem)
catch theError as VException
if theError.ErrorNumber = 525583 then //propertyName is
indexedbywords. remove that.
if localFormatDB <> nil and localFormatDB.isOpen then
localFormatDB.close
end if
vdb = new VDatabase
vdb.open(formatFolderItem)
if vdb <> nil then
vdb.Table("bibAndDoc").StringField("propertyName").indexByWords =
false
vdb.Table("bibAndDoc").Field("propertyName").isIndexed = false
vdb.flush
vdb.close
vdb = nil
end if
localFormatDB.open(formatFolderItem) -> STILL throws an
error. And the db is not updated.
else
raise theError
end if
end try
Thanks,
Jon
More information about the Valentina-beta
mailing list