PreviousPDAC Programmer's Guide (9.1 revision 1) Next

Differences Between Pervasive and Borland Implementation

Show this topic in Library frames

The following table shows differences between how Pervasive and Borland components function:

TPvTable
All alias management functions perform "named database" management.
Inherits from TPvDataSet rather than TDBDataSet;
Properties TableLevel, UpdateObject, UnlockTable, OpenIndexFile, CloseIndexFile have been dropped, TableType is ignored.
The "Database Name" property can be provided at both design time and runtime as a DSN, a Pervasive Named Database, or as a fully-qualified path to the database.
TPvDatabase
Property DriverName, Locale, and TTraceFlags have been dropped;
Handle's type is changed to DRM_DBID
IsSQLBased always returns False;
TransIsolation has only two possible values, 'tiDirtyRead' and 'tiReadCommitted' (the default).
EPvDBEngineError
replaces EDBEngineError
TPvDBError
replaces TDBError
TPvSqlSession
All alias management functions perform DSN management.
The type of Property 'Handle' has been changed to SQLHENV.
Method 'AddStandardAlias' adds an Engine DSN with default settings.
Property 'UpdateDsnType: TDsnTypes' has been added. 'TDsnTypes = (dsnSystem, dsnUser)'. 'UpdateDsnType' means:
In case of 'DeleteAlias' function - which DSN user is going to delete: System or User DSN?
In case of 'AddAlias' and 'GetAliasParameters' functions - hints which DSN type is preferred.
TPvSqlDatabase
The type of Property 'Handle' has been changed to SQLHDBC.
Property 'IsSQLBased' is always true.
Properties 'Tables' and 'StoredProcs' have type 'TSqlTablesInfoCollection' and 'TSqlStoredProcInfoCollection' correspondingly.
TPvQuery
Inherited from TQuery
The type of Property 'Handle' has been changed to SQLHSTMT.
The type of Property 'DBHandle' has been changed to SQLHDBC.
Property 'StmtHandle' has been dropped.
Property 'Text' always returns text from property 'SQL'.
Method 'CheckOpen' has been dropped.
All index and key related properties and methods (like 'GetIndexInfo') have been dropped.
A new property 'LoadBlobOnOpen' has been added. If 'LoadBlobOnOpen' is true, then all BLOBs will be cached in memory on query open. If 'LoadBlobOnOpen' is false, then BLOBs will be read as required.

TransIsolation Property Differences

The TransIsolation property behavior of the Pervasive Direct Access Components is different from that of their Borland equivalents.

Transaction isolation level determines how a transaction interacts with other simultaneous transactions when they work with the same tables, and how much a transaction sees of operations performed by other transactions.

Use the property TPvDatabase.TransIsolation to specify the transaction isolation level for the database.

Pervasive Direct Access Components only support the tiReadCommitted mode. This means that other users cannot see the changes made to a file until the transaction ends. This is the only setting supported by the underlying Pervasive.SQL engine.

DSN-Less Connections

PDAC's relational components are now able to connect from a client machine without a DSN or Named Database to a remote server database. The server must have a DSN for the database.

This feature works through the use of a new property, 'AliasNameIsConnectionString', which has been added to the TPvSqlDatabase component. For more information, see Specific Class Differences from VCL .

  1. Drop a PvSQLDatabase on a Delphi form.
  2. Supply a fictitious DatabaseName -- it can be anything.
  3. Set the new property 'AliasNameIsConnectionString' to True.
  4. Set the 'AliasName' property (or the 'DatabaseName,' leaving 'AliasName' blank) to the Connection String.
  5. The Connection String is the complete connection string for ODBC, including the DSN on the server and the name of the server.

Example:

DRIVER={Pervasive ODBC Client 
Interface};ServerName=DSLINUX2; 
ServerDSN=DEMODATA; UID=myuserid;PWD=mypassword 


Note
There are no quote marks or line breaks in the connection string. If your editor has wrapped the preceding line, make it a single line in the property editor.

If a username and password are required, they may be supplied as part of the Connection String; if they are not in the Connection String, the standard database login dialog will be displayed if the 'LoginPrompt' property is True.

  1. Set the database to "Connected" and use as usual.

All these steps may be performed at design time or through code at runtime.


Chapter contents
Publication contents

Prev topic: Using the Pervasive Direct Access Components
Next topic: Deploying an Application Based on PDAC