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!

variable length record table structure

Status
Not open for further replies.

delphidestructor

Programmer
Oct 20, 2000
67
Can anyone offer any suggestions on how to create table definitions on a Btrieve file with variable length records? I have a file that has variable length records ranging from 252 to 1502 bytes in length. I’m not sure if the approach that I am taking is the right one. I have started by defining the record structure on one record length and then using a view that selects only the records that conform to this record length.
“select * from results where sample type = 5” Sample type being the records with a 252 byte record structure. This seems to be working, no errors are generated within the PCC, the problem that I am running into is that I cannot see the view, only the table definition when accessing the data through ADO connections.
 
Actually, the Variable length portion of the record should be defined as a LVAR, NOTE, LongVarChar, or LongVarBinary depending on the way the data is stored. If your variable length field has a structure, you can interpret it once it is returned from the driver.
You should be able to select from the view even if you can't see the name of the view through ADO. mirtheil@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
If the variable length is split into several fields then most likely you will not be able to create a table definition on those fields. The reason is the field's starting postions change depending on the length of the fields. DDF files require the data to always be in the same position. About the only way to get the data out in this situation is to write a program to do it. Gil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top