Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 5 of 5 total |
test file for a field |
Mon, Aug 14 2006 10:04 PM | Permanent Link |
Jerry Blumenthal | Is there a way to test a file for the presence of a field without
opening it? Or is the only thing you can test Major Version, Minor Version? I tried using code like: dbtemp.Databasename := isamdb.DatabaseName; dbtemp.TableName := 'person.dat'; try if dbtemp.fieldbyname('pwd').asboolean = false then; except result:= true; exit; end; I always get an edatabase exception in the IDE and no exception when not in the IDE. And the file DOES have the pwd field. So this test is not working. Jerry |
Tue, Aug 15 2006 4:00 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Jerry
What about testing FieldDefs - I'm not sure if the table has to be open or not though. Roy Lambert |
Tue, Aug 15 2006 12:04 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jerry,
<< Is there a way to test a file for the presence of a field without opening it? Or is the only thing you can test Major Version, Minor Version? >> The only way to do so is via low-level reads of the .dat header. ElevateDB can do so, however, because this information is stored in the database catalog and not in the actual table files. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Aug 15 2006 1:06 PM | Permanent Link |
Jerry Blumenthal | Tim Young [Elevate Software] wrote:
> Jerry, > > << Is there a way to test a file for the presence of a field without opening > it? Or is the only thing you can test Major Version, Minor Version? >> > > The only way to do so is via low-level reads of the .dat header. ElevateDB > can do so, however, because this information is stored in the database > catalog and not in the actual table files. > "via low-level reads of the .dat header" How might I do that? I used a Hex Editor to look at a DAT file, and I can see the names of the fields there, but I'm not sure if I should do a blockread or something else to look at the header. And I dont know how much to read, to look for the field, altho, of course, I do know the structure of the table in question. Also- the length of the record is longer in the version of the table that has that extra (boolean) field. Could that help? Jerry |
Tue, Aug 15 2006 6:32 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jerry,
<< How might I do that? I used a Hex Editor to look at a DAT file, and I can see the names of the fields there, but I'm not sure if I should do a blockread or something else to look at the header. >> Do you have the DBISAM source ? If not, send me an email with what version of DBISAM you want the header structures for and I'll send them to you. You can then just use normal file I/O using a TFileStream object to read the headers. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |