Developer Quick Start
The Zen Software Development Kit (SDK) offers you the best of both worlds for database solutions: The MicroKernel Engine offers high speed data transactions, and the Relational Engine provides full featured relational data access to the same data with greater performance in reporting and decision support.
The following topics offer quick tips to help you begin building applications with Zen:
Choosing An Access Method
Many factors affect development strategy choices. Availability of tools on different platforms, the developer's familiarity with a given programming environment, and portability requirements often play decisive roles in the process. On the other hand, when the developer has more flexibility, various subtle factors should be considered.
Performance is always a consideration. Run-time performance, however, must be balanced against development time: is it more important to deliver the program quickly, or to have it run quickly in use?
In the context of database programming, the database interface affects both development time and run-time performance. Often the choice between SQL and Btrieve is based on these factors alone.
If you are new to Zen products, you may want to use access methods such as ADO.NET, JDBC, Zen Direct Access Components for Delphi and C++ Builder, or other third-party development tools to develop Zen applications.
If you want to directly write to the Btrieve API, see
Btrieve API Programming.
The following table compares the various Zen access methods.
Database Connection Quick Reference
This section provides links to quick information on how to get connected to a Zen database.
These examples should only supplement the full documentation for each access method. For each access method, there are links to more detailed information.
Each sample references the Course table in the DEMODATA sample database, which is included with Zen.
ADO.NET Connections
For complete information on ADO.NET tasks, see
• Code examples provided when you install the downloaded ADO.NET sample headers and files
Sample ADO.NET DB Connection Code
"ServerDSN=Demodata;UID=test;PWD=test;ServerName=localhost;";
JDBC Connections
For complete information on JDBC tasks, see the following topics in JDBC Driver Guide:
Sample JDBC Connection Code
Class.forName("com.pervasive.jdbc.v2.Driver");
Connection con = DriverManager.getConnection("jdbc:pervasive://localhost:1583/DEMODATA");
PreparedStatement stmt = con.prepareStatement("SELECT * FROM Course ORDER BY Name");
ResultSet rs = stmt.executeQuery();
Java Class Library
For complete information on Java Class Library tasks, see
Sample JCL Connection String
Session session = Driver.establishSession();
Database db = session.connectToDatabase();
db.setDictionaryLoc("c:\\PVSW\\DEMODATA");
DSN-Less Connections
Zen allows an application to perform a DSN-less connection (connecting to the SQL engine without using a DSN):
The following steps should be used when running locally on the server or from a remote client. This method works with Enterprise Server as well as Workgroup engines.
1. SQLAllocEnv
2. SQLAllocConnect
3. SQLDriverConnect: "Driver={Pervasive ODBC Client Interface};ServerName=<ServerName to Resolve>;dbq=@<ServerSide DBName>;"
Example
Driver={Pervasive ODBC Client Interface};ServerName=myserver;dbq=@DEMODATA;
ODBC Information
The implementation and limitations of the Zen ODBC access method is documented in the ODBC Guide. This documentation is shipped with Zen Enterprise Server, Cloud Server, Workgroup, and Client editions.
Other SQL Access Methods
JDBC
For JDBC programming to the SQL engine, see the following topics in JDBC Driver Guide.
PDAC
Zen Direct Access Components are for Delphi and C++ Builder applications. For more information, see the following topics in Zen Direct Access Components Guide.
Additional Resources for Application Developers
The following topics provide further reading on Zen concepts.
Conceptual Information
This manual contains database conceptual information on both the MicroKernel Engine and Relational Engine.
Reference Information
Reference information for developers is contained in the various software development kit (SDK) manuals. In the Eclipse Help that can be installed with the database engine, see the topic Developer Reference.
Online Developer Resources
Get information for developers online at the
Actian Zen website.
Sample Code
You can find the sample applications in your installation of the SDK component. The available samples include the following:
• Zen Direct Access Components using Delphi or C++ Builder
• Java Programming with the Zen Java Class Library or JDBC
• Distributed Tuning Interface for Visual C++ or Delphi
• Distributed Tuning Objects for Visual Basic