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 > btrieve/pervasive database name

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-16-11, 07:33
philfer philfer is offline
Registered User
 
Join Date: Dec 2010
Posts: 26
btrieve/pervasive database name

Hello,

I am having trouble connecting to our Btrieve DB using ODBC. I have the Pervasice client with ODBC driver but when I try and create a connection (by specifying the paths to the ddf's and then to the .btr files) I get errors.

I copied the ddf's to the temp database folder created when you install the Pervasive client and when I connect using ODBC in MS Access it uses the ddf's, as a dialog appears with the table names in it, but when I click one it says it cant connect/find the data.

I am wondering whether it is specifying the database name that I am doing incorrectly as I dont know what it is or how to find out what it is.

I feel I am close to connecting via ODBC but am a whisker away! Any help?
Reply With Quote
  #2 (permalink)  
Old 07-16-11, 12:20
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
Quote:
Originally Posted by philfer View Post
I am having trouble connecting to our Btrieve DB using ODBC. I have the Pervasice client with ODBC driver but when I try and create a connection (by specifying the paths to the ddf's and then to the .btr files) I get errors.
What are the exact errors?

Quote:
Originally Posted by philfer View Post
I copied the ddf's to the temp database folder created when you install the Pervasive client and when I connect using ODBC in MS Access it uses the ddf's, as a dialog appears with the table names in it, but when I click one it says it cant connect/find the data.
Sounds like you have paths hard coded into the DDFs. Check the X$FILE system table through the Pervasive Control Center. If the XF$LOC field has paths and filenames, the data files need to be in those paths.

Quote:
Originally Posted by philfer View Post
I am wondering whether it is specifying the database name that I am doing incorrectly as I dont know what it is or how to find out what it is.
Depending on what version of PSQL you're using, you really should be using a database name rather than a path on the connection string.
__________________
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 07-19-11, 13:14
philfer philfer is offline
Registered User
 
Join Date: Dec 2010
Posts: 26
btrieve/pervasive database name

Hello,

I have attached a screen print of the error on the Word doc attached.

I looked at the X$File Table in the Pervasive Control Centre and the table I was trying to connect to didnt have a location in Xf$Loc just a filename. Other tables that I want to connect to did have paths. Those tables are in that location but I think because I copied the DDF's to the DEMODATA folder on the C Drive installed when the Pervasive client was installed I wasnt able to configure it so it would look at the network path and I think it might be trying to find the data tables on the C Drive also. (unless it simply looks at the DDF's regardless of where they are located and follows the path it finds in these to get to the data tables??)

In Services in Admin Tools Pervasive.SQL (2000) (transactional) and (relational) are both listed as Local System. Could this have anything to do with it as when the DDF's were in their original location on the network (before I copied them to the C Drive DEMODATA folder) and I set up an ODBC DSN with the database name MYTEST and put the paths to the network locations for the DDF's and the BTR files I get the second error on the Word doc when I try to use the DSN in MS Access.

I feel I am getting closer though

Thanks for your help
P
Attached Files
File Type: doc psql odbc err.doc (46.0 KB, 41 views)
Reply With Quote
  #4 (permalink)  
Old 07-19-11, 18:57
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
DDFs and data files are a matched set. You should never move one into a directory without also moving the other. From what you've said, you copied the DDFs to your DEMODATA directory. Did you also copy the data file(s) to the DEMODATA directory? If the entry in XF$LOC doesn't have a path and is just a file name, the file must be in the same directory as the DDFs or a status 11, 12, or 35 will occur.
__________________
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
  #5 (permalink)  
Old 07-20-11, 11:35
philfer philfer is offline
Registered User
 
Join Date: Dec 2010
Posts: 26
Hi,

That worked when I copied the file for which there was no path to the Demodata folder on the root drive.

My next challenge is to connect to the networked files i.e. the ones that do have paths as this is my ultimate goal as the imports/links will be automated to read the data from these locations

Thanks a million
P
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