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
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.
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 ?
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 ?
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?
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.
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)