Pervasive
Sign in | Join | Help
in

ODBC vs PCC db setup/connection

Last post 06-26-2008 7:48 AM by jpruneda. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-25-2008 6:11 PM

    • h2w
    • Not Ranked
    • Joined on 09-26-2006
    • Posts 1

    ODBC vs PCC db setup/connection

    Hi,

    I need to set up a Pervasive db in ODBC. I've done it in the past (after some trial & error) and now trying again... I seem to recall that with Pervasive 9, if I sucessfully set it up in PCC, then ODBC picked it up... the trick is getting it set up in PCC so that it picks up the tables.

    The database is for BusinessVision, which uses Pervasive, but for some reason you have to set the db up in PCC; it's not already one of the dbs listed.

    It looks like the new db setup works but when I check the tables, nothing. Anyone able to help with this? (Yes, I've gone thru the manual but it hasn't helped. There must be a step I'm missing or is left out.)

    Thank you,
    h2w

  • 06-26-2008 7:36 AM In reply to

    Re: ODBC vs PCC db setup/connection

    The PCC does create a DSN in the ODBC Administrator when you add a database, or create a new one.  Can you give a little more detail on this?  By nothing, do you mean there is no data in the tables, or no tables.  In the location where the BusinessVision resides, are there any files with a DDF extension prior to creating the database? 

    For a database to be viewable in the PCC, you need to have Btrieve files and Data Dictionary Files (DDFs).  The DDFs hold all of the table structure information for a table.  If your files are strictly Btrieve, you would have to create DDFs and define table/field/index structure for each file.

  • 06-26-2008 7:48 AM In reply to

    Re: ODBC vs PCC db setup/connection

    To set up the dsn, you have to point to the database's ddf (data dictionary files).  For example, if you right click on demodata,  you can examine its properties.  You will see the directories section-- the directory location for the dictionaries and the directory location for the files.   The ddfs are special files that describe the contents of the database.  When you say that you do not see any tables after setting up the database, this tell me that you created a new set of ddfs in the directory that the data files are in.  A new set of ddfs dows not have the table definitions in them.  Someone has to define the existing data tables to the ddfs. 

    So do you know, if your vendor provided predefined ddfs for your database.  They do not necessarily have to be in the same directory as your data files.  You can use the properties that was mentioned previously to indicate if the data files are in another location.  

    Try this:   Create a new directoy.  Copy the files with the extension *.ddf from the c:\pvsw\demodata to your new directory.  Now go into the PCC and set up a new database.  You can name it Fred for the database name.  For the location, browse to your new directory.  Select finish.  Open the new database Fred in the PCC.  You will see the tables since they are defined in the ddfs.  But if you try to open one, it will fail, because the database is assuming that you have the files in the same directory as the ddfs.   So now copy the datafiles from c:\pvsw\demodata into your new directory.  In this case, the data files are all the files with the extension  *.mkd .  Now, you should be totally there and your new database should be functional.

    You could have also copied your files to another directory.  In that case, you would have gone to properties, to add a new data location.  Then you would have removed the incorrect data location which points to your first new directory.

     

Page 1 of 1 (3 items)
© 2008 Pervasive Software Inc. All Rights Reserved.