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 > Non standard db file names

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-29-09, 12:51
bob smith bob smith is offline
Registered User
 
Join Date: Jan 2009
Posts: 2
Non standard db file names

Hello All.

I have a legacy system using dozens of pervasive files.
An example of one of the files is &CUSTOMER.001

The files are currently being accessed via the BTRIEVE api using
transactional commands (readfirst, readnext, etc...)

I want to make enhancements by adding on a new system that
accesses the files using SQL. I am using the DDF builder to create an OEM
data store.

DDF builder generates an error when I try to assign the file to a the CUSTOMER table. DDF bulder does not like the '&' on the front of the file name. If I rename &CUSTOMER.001 to qCUSTOMER.001 I have no problem however in doing so the file is now not compatable with my legacy system.

Is there a way to get pervasive to accept the '&' as part of the file name?

Any help is appreciated.

Thanks
Reply With Quote
  #2 (permalink)  
Old 01-29-09, 13:44
mirtheil mirtheil is online now
Registered User
 
Join Date: Dec 2001
Posts: 1,026
I would suggest using a CREATE TABLE statement with a USING clause. This worked for me in a quick test:
CREATE TABLE customer USING '&customer.001' (f1 char(10))
Add an IN DICTIONARY clause to prevent the engine from recreating the Btrieve file:
CREATE TABLE customer IN DICTIONARY USING '&customer.001' (f1 char(10))
__________________
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 01-29-09, 14:50
bob smith bob smith is offline
Registered User
 
Join Date: Jan 2009
Posts: 2
Thanks Mirtheil. That took care of the problem.
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