Adding support for Pervasive.SQL to DA

The company I work for uses Pervasive.SQL as their database. I’ve been using ODBC/ADO.NET to connect to the database in both Delphi and Oxygene without any problems. I want to start to use Data Abstract, and immediately I see that I would need to add an entry/configuration information for Pervasive.SQL under the ODBC.NET section of the daConfig file.

First question - has anyone done this successfully already? If so, if you could pass me the details that would save me a ton of time.

Second question - if nobody has, what is the bare minimum I need to add ot the daConfig to get this working (hopefully)? I’m completely new to DA, so i’m flying blind here.

Thanks in advance,

Alan

Hello, Alan.
You can find initial information of how to configure drivers in the daConfig in our wiki:
http://wiki.remobjects.com/wiki/How_to_Configure_Additional_Drivers_(.NET)
Here’s general information about daConfig: http://wiki.remobjects.com/wiki/.daConfig.

If you’ll have more questions - please ask.

Here is what I’ve done so far…

Under the ODBC.NET entry in the daConfig, I’ve added one entry:

ODBC.NET>





/ODBC.NET>

Then, under the DatabaseProfiles section, I’ve added one entry:
{



}

I figured this was the bare minimum, and that now I SHOULD see my “Pervasive” entry show up when I go and start a new DA project.

But when I go and start a new DA project, I get the wizard and I choose to build my connection string. I first choose ODBC.NET, and then find that my ‘Pervasive’ entry is not showing up under the 2nd prompt.

What could I be doing wrong?

Alan

Hello, Alan.
Looks like there is a bug in the New Project wizard and changes made in the .daConfig file doesn’t fall into Connection string builder called from wizard. Registered issue #64317.
As a workaround can you try to use Schema Modeler to create proper connection string? Does ‘Pervasive’ entry shows there?

Hi! thanks for the reply, and sorry for taking SO LONG to get back to you, but I was given one of those ‘emergency projects’ that ended up taking long than anticipated.

Anyway, I’m back to Data Abstract, and I did just what you mentioned, and yes - I was able to connect to the database via SchemaModeler, but NOT from the new project wizard. I also just installed the latest DA for .NET and it appears as if the issue you created hasn’t been addressed yet?

I’m using Version 7.0.71.1093. When do you see this issue being resolved?

Another question - if I create a schema from SM alone, how can I bypass the Wizard steps for a new project and create a server/client project using the existing schema?

Thanks,

Alan

Hello, Alan.

7.0.71.1093 - is the version of Fall 2013 release (from Sep, 10). The bug is fixed in releases post the 1st of October. Please try latest beta, you can find it here: https://secure.remobjects.com/portal/downloads/beta.aspx

As for client/server application for existing schema - you can create DA client/server application, using wizard, that will generate some default schema and then replace generated schema with yours in the server project. No server code is specific to the schema.
Then you have 2 options to ajust client to the server:

  • Regenerate DA Linq table definitions, using context menu of the schema or remote schema files (or if you use dataset - regenerate it using context menu of the data adapter)
    or
  • Generate new client for existing server, using new project wizard again.

I too realized this mistake I made, and I just installed the latest beta - 7.0.72.1103.

Its working now. Sorry for the confusion!!

Alan

Hi Alan,
I am in the same boat as you. I am new to Data Abstract (just downloaded the trial today) and I need to get it to work with Pervasive Sql 10.3. Did you succeed? If you can you send me any information that can help me get going, it would be much appreciated.
Ed

I did get this to work, actually. I’ve built a couple DA servers and class libraries in the process and it works gloriously, especially under .NET where you have DALINQ. I’m not home right now, but all I had to do is modify the daconfig file to make an entry that uses the PSQL ADO driver. it was just a bit of trial/error, but I did get it to work.

If I don’t reply to you later or tomorrow, drop me another email and I will show you the parts of the daconfig I added.

alan

Hi Ed -

Hopefully this helps you get DA working w/ PSQL.

In the DataAbstract.daConfig file…

Under <ODBC.NET> add this:

    <Mapping Name="{Pervasive ODBC Client Interface}"
             Profile="Pervasive" >
  <ParamMappings Database="ServerDSN"
                     Server="ServerName"
                     UserID=""
                     Password="" />
</Mapping>

then, under add this section:

<Pervasive QuotingIdentifiers='""'>
  <DatabaseLocation Type="Select" />
</Pervasive>

Following those changes, I was able to connect to my database and build a schema in SchemaModeler. Everything is working great on my end.

Please give this a try and let me know if it works for you.

Alan

Thanks Alan, much appreciated. I am currently working on a big project developing for our company. I am stuck with Pervasive Sql 10.3 (that database came with our accounting package) and unfortunately I have very few development tools that can help speed up this project. Currently I am using Typed Data Sets with DevExpress … I am hoping Data Abstract will improve on that.

Ed

Hi Ed -

May I ask what development tools you are using? I’m currently only using DA with .NET - writing my code in Oxygene. DA LINQ in .NET is pretty amazing. The reduction in code is quite impressive.

Alan

Hi Alan,
I am still unable to see my Pervasive entry. Where is the daConfig file suppose to exist. I’ve copied it to the directory where I am trying to create the project. The original daConfig files that come with the software (in Program Files\RemObject Software\Data Abstract (Common)\Bin) are marked as read only so I didn’t modify there … so I am still stuck like you were when you started.

With regards to my current development tools. I am using VS 2013. For data access I am developing a DAL using typed datasets (I am not happy with that, it has its problems but I could not find anything else that would work out of the box with Pervasive 10.3). My DAL resides in a class library so that I can link it to multiple projects. Currently the DAL is used in a Windows Service and in the Client Desktop software. I am planning in the future to also create a WebService using the DAL. For the user interface I am using components purchased from DevExpress. All my development is in C#.

Ed

Hello

You have to update the DataAbstract.daConfig file in the folder …\RemObject Software\Data Abstract (Common)\Bin too to let the Schema Modeler to see the Pervasive entry

Hi,
I got further. The Pervasive entry is showing up but the connection string that was build does not work. The resulting connection string is:
ODBC.NET?AuxDriver={Pervasive ODBC Client Interface};ServerName=ed-mobile;ServerDSN=giraffelocal;

I have a connection defined for the database in VS2013 that is working, that connection string is defined as:
Dsn=GIRAFFELOCAL;arrayfetchon=1;arraybuffersize=8;dbq=GIRAFFELOCAL;openmode=0;clientversion=10.30.017.000;codepageconvert=1252;pvclientencoding=CP1252;pvserverencoding=CP1252

Any other suggestions?