If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > Creating file for BUTIL load

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-10-04, 06:45
Markus123 Markus123 is offline
Registered User
 
Join Date: Nov 2004
Posts: 14
Creating file for BUTIL load

Hi,

I want to create a text file to import data via BUTIL load. Looking at some files created via BUTIL recover exemplify that some types like integer or date are encoded in a "strange" format. Can someone tell me, how I can encode them by my own?

Thanks for your help,
Markus
Reply With Quote
  #2 (permalink)  
Old 12-10-04, 07:46
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
The records in a BUTIL Unformatted File are stored in the following format:
<record lenght>,<binary byte image of the record>
What does that mean? That means that integers are stored in their byte swapped format. Dates are stored as their 4 byte format and so on.
You would do much better to write a custom import routine that take a simpler format and imports the data or create DDFs for the Btrieve files and use the Import Wizard with Pervasive.SQL 2000 or later. The Import Wizard can pull in data from CSV formats.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #3 (permalink)  
Old 12-10-04, 09:05
Markus123 Markus123 is offline
Registered User
 
Join Date: Nov 2004
Posts: 14
Thanks for your help - I will try all these things

Greetings,
Markus
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On