Connection to Pervasive V8

Hello to everyone,
I have just started using Servoy and I try to connect to Pervasive PSQL V8.5.

I have tried with two different drivers. The connection to the DB Servers of Servoy is performed without errors, but the following errors appears when using tables on forms:

1. PERVASIVE DRIVER
Error:
com.servoy.j2db.persistence.RepositoryException:
Cannot work without a primary key (the message is in Italian, this is a translation)

Follows the connection setting:
jdbc:pervasive://localhost:1583/DEMODATA
com.pervasive.jdbc.v2.Driver

The Pervasive files copied in the Drivers folder are:

  • pvjdbc2.jar
  • pvjdbc2x.jar
  • jpscs.jar

The classpath and path variables have been entered by installing Pervasive.

2. SUN DRIVER
Error:
com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: Column not found Column not found

Follows the connection setting:
jdbc:odbc:DEMODATA
sun.jdbc.odbc.JdbcOdbcDriver

Any ideas ?

  1. The pervasive jdbc driver is not complying to the jdbc specification, it fails to report PK info among other things. But you can manually set the row identifier column for a table.

Note: do use Servoy 3.1.6 (or 3.5) with pervasive, I suspect you already are using this version (if not this could explain your second point), since older servoy versions did break on the bad pervasive driver.

You are right, I’m using the 3.1.6 versione of Servoy.

How can I set manually the row identifier column for a table ?

is property on a column in dataprovider editor

I found also other issues about primary keys, but I didn’t understood how to set it.
By generating a new table, Servoy allows to define a pk; on existing tables no.
I’m trying to use an exisiting and already populated DB with almost 200 tables. What should I do to define a pk on exisitng table ?

see the manual for “Row Ident”

I have already check the:

  • Servoy3DevReferenceGuide.pdf
  • Servoy3DevUserGuide.pdf
  • other documentation I found in Italian language

before replying. Could you pls be more specific ?
Thanks for helping :)

Ricc:
before replying. Could you pls be more specific ?

  • Launch Servoy Developer and open your solution.
  • Go to designer mode (Command/CTRL-L)
  • Open Dataproviders window (Command/CTRL-SHIFT-D)
  • Select your DEMODATA database server.
  • Select one of the tables
  • You see in the right pane a grid with the Row Ident column.
  • Click the correct row and select Row Ident from the Row Ident column.
  • Click on the Apply button for good measure.
  • Rinse and repeat for all the other tables from that database.
  • Close Dataproviders window and you are good to go.

Hope this helps.

At the Demodata, that comes with Pervasive, I have succeed setting the row ident and data are loaded on forms, while on a customer’s DB no.

I have notice that the row ident selection is enabled only for the fields that the “Allow Null” is unchecked and on the customer’s DB all fields are checked.

Is there any alternative solution for that in Servoy? Is it possible to uncheck the “Allow Null” option in Servoy ?

Hi Riccardo,

Row identifiers always have to be unique and can’t be null so no wonder Servoy doesn’t let you.
And the checkbox in the dataproviders window is merely an indicator. To change it you need to do it with a third party tool.
Since PervasiveDB is based on PostgreSQL wouldn’t pgAdmin3 work with it?

Hope this helps.

Hi Robert,

pgAdmin3 cannot make changes to pervasive tables.

Is there any way to solve the error of the sun’s driver ?

Both drivers work fine with Jasper Reports!

Ricc:
Hi Robert,

pgAdmin3 cannot make changes to pervasive tables.

Is there any way to solve the error of the sun’s driver ?

Both drivers work fine with Jasper Reports!

I just downloaded Pervasive SQL Server 9 to take a look.
It seems you can use PCC (Pervasive Control Center) to make changes.

As for the driver. I have no idea.

Hope this helps.

ROCLASI:
I just downloaded Pervasive SQL Server 9 to take a look.
It seems you can use PCC (Pervasive Control Center) to make changes.

I dug some deeper into this tool.
Just browse to the tables of your database in the tree on the left.
Right-click on the table and select ‘Edit’.
Then you get a new window where you can edit the columns and their properties.

Nice DBA tool btw, looks like it’s based on Eclipse.

Hope this helps.

Thank you Robert, I really appreciate your help.

The changes applied with the Pervasive Control Center at the DEMODATA are perfectly visible to the Servoy environment,
while
those applied to the Customer DB no!

The main difference between the two DBs is the file extension. In Pervasive each table is also one file.
The extension of the DEMODATA is *.mkd, while the one of the Customer’s is *.dat.
Also, all fields of all tables in the Customer DB have the flag “Null” off !?

I’not sure if what I see on PCC are the tables info OR the Data Definition Files (DDFs) info. The JDBC drivers as also the ODBCs uses the DDFs.

I will try some other tool for accessing the DDFs and I will let you know.

Servoy 3.5 rc3 will allow to specify row_ident to be placed on nullable columns (this is also required for views as discoverd on the Dutch user group meeting)

Great news!!!
Thank you :)

It works !!! My congratulations to the Servoy team!
By using the Version 3.5 rc6-build 511 I’m able to specify Row Ident on null fields.