This article describes how to use the ODBC drivers included in Pervasive.V8 and later to connect to, and pull data from, your database. The security model in Pervasive.V8 and later changes slightly from earlier versions which necessitates extra steps.This procedure will modify the database dictionary (DDF) files which will cause Service Accent to generate errors if you do not follow the instructions correctly
- Use Windows Explorer to create a new folder in your AccentDB folder called ODBC
- Use Windows Explorer to copy all the files with a .DDF extension from your AccentDB folder to the AccentDB\ODBC folder
|Service Accent version 4.11.203 and later removes the security from the DDF files. If you are running this version or a later version of Service Accent please go straight to step 5|
- At this point, you need to get to the command prompt and change to your AccentDB\ODBC folder
- While you are in the AccentDB\ODBC folder, type the following:
for %a in (*.ddf) do butil -save %a %~na.sav
for %a in (*.ddf) do butil -clone %~na.new %a
for %a in (*.ddf) do butil -load %~na.sav %~na.new
ren *.new *.ddf
This step will remove the existing security from DDF files in the AccentDB\ODBC folder
- You must now create the ODBC connection. Click Start | Control Panel | Administrative Tools | Data Sources (ODBC)
- Click on the System DSN tab
- Click Add...
- Select Pervasive ODBC Client Interface
- Click Finish
- Give the data source a name, for example, "Service Accent Client"
- In the Server section, enter your server's name
- Click Create... to create a new connection on the server
- In the Logon dialog, enter your usual logon credentials for that server
- Give the data source a name, for example, "Service Accent Engine"
- Click Create... next to Database Name
- Give the database a name, for example "Service Accent"
- Ensure Integrity Enforced is ticked and Bound (DDFs created) is unticked
- The Btrieve security policy should be set to Database (DB authentication and authorization)
- Click Browse... in Dictionary location and select your AccentDB\ODBC folder
- You will see that the default folder of AccentDB\ODBC has been added to the Data File Locations. Highlight this and click Delete
- Click Add... and select your AccentDB folder
At this point, the Create Database window should resemble the following:
- Click OK
At this point, the Create Engine DSN window should resemble the following:
- Click OK
At this point, the Pervasive ODBC Client DSN Setup window should resemble the following:
- Click OK
- Click OK to quit the ODBC Data Source Administrator
That completes the creation of an ODBC connection to your database.Please note that if you apply an update to Service Accent that updates your database, you will need to repeat steps 2 through 4 so as to use the latest Database Dictionary Files. If you do not do this, your application will attempt to connect to your Service Accent database using out-of-date database definitions and you may receive errors.