64-bit ODBC Driver
Pervasive PSQL v11 now supports the ODBC interface for 64-bit applications. The 64-bit ODBC driver is installed with Pervasive PSQL Server 64-bit and Pervasive PSQL Client 64-bit.
ODBC and Data Source Names (DSNs)
On 64-bit Windows operating systems, 64-bit DSNs are distinct from 32-bit DSNs because of the Windows registry design. Windows ODBC Data Manager requires that you know the bit architecture (called “bitness”) of your application and create a DSN with that same bitness. Pervasive PSQL v11 adopts this same model. Therefore, 64-bit applications use the 64-bit ODBC driver and 32-bit applications use the 32-bit ODBC driver.
The application bitness does not have to match the bitness of the Pervasive PSQL Server product. For example, the 64-bit ODBC driver or the 32-bit ODBC driver can be used with either Pervasive PSQL Server 64-bit or Pervasive PSQL Server 32-bit.
Pervasive PSQL v11 provides three ODBC drivers, as shown in the following table.
Table 12
Pervasive PSQL ODBC Drivers for Windows
ODBC Driver
PSQL Product Installed With
Behavior for All Products Installed With
Pervasive ODBC Engine Interface
Server 64-bit
Server 32-bit
Workgroup
•
Setup creates 32-bit Engine DSNs
•
Connects to a local named database
•
For use by 32-bit applications
•
Deprecated in Pervasive PSQL v11, as explained below
Pervasive ODBC Client Interface
Server 64-bit
Server 32-bit
Client 32-bit
Workgroup
•
Setup creates 32-bit Client DSNs
•
Connects to a local or remote named database or an Engine DSN
•
GUI lists both named databases and Engine DSNs
•
For use by 32-bit applications
Pervasive ODBC Interface
Server 64-bit
Client 64-bit
•
Setup creates 64-bit DSNs
•
Connects to a local or remote named database
•
For use by 64-bit applications
To simplify the method for connecting to a named database, Pervasive PSQL v11 includes the following enhancements:
•
Deprecating 32-bit Engine DSNs. The 32-bit Engine Interface driver is still provided in this release, primarily for backwards compatibility. Pervasive recommends, rather than using Engine DSNs, that new or revised 32-bit applications connect to a named database through a Client DSN or use a DSN-less connection by specifying “Pervasive ODBC Client Interface.”
•
Deprecating the DTI functions that manage 32-bit Engine DSNs. See
DTI
.
•
Providing a 64-bit Interface driver only for named databases. The 64-bit ODBC Interface can connect to a local named database, thus replacing the function of the Engine DSN, or to a remote named database. Connection to an Engine DSN is not supported.
Frequently Asked Questions
The following table answers some frequently asked questions (FAQs) about the ODBC and DSN support in Pervasive PSQL v11.
Table 13
FAQs About ODBC and DSN Changes
Question
Answer
Is the 64-bit ODBC driver supported for Linux distributions or Macintosh OS X?
No. Only Windows platforms are supported as discussed in Table
12
.
What happens to my existing 32-bit Engine DSNs when I upgrade to Pervasive PSQL v11 Server or Workgroup?
No migration steps are required. Existing 32-bit Engine DSNs remain in place and continue to work as configured.
Applications on the PSQL Server or Workgroup machine continue to work with 32-bit Engine DSNs.
What happens to my existing 32-bit Client DSNs when I upgrade to Pervasive PSQL v11 Client?
No migration steps are required. Existing Client DSNs continue to connect to remote Engine DSNs.
If you edit a Client DSN with ODBC Administrator, you have the option to continue using a remote Engine DSN or to use a remote named database. See
ODBC DSN Setup GUIs
.
Note, however, the recommendation is that new or revised 32-bit applications should connect to a named database, not to an Engine DSN since Engine DSNs are deprecated.
Are connections that use “Pervasive ODBC Client Interface” affected (so called “DSN-less” connections)?
No. DSN-less connections that connect using “Pervasive ODBC Client Interface” continue to work.
What about connections from PSQL Clients of previous releases (such as a PSQL v10.x Client)?
Pervasive PSQL v11 still supports remote Client DSNs, so clients from previous versions can still connect.
Note, however, Engine DSNs are only 32-bit for both Pervasive PSQL Server 32-bit and 64-bit. 64-bit Engine DSNs cannot be created with Pervasive PSQL.
What are the ODBC connection strings for Pervasive PSQL DSNs?
See
ODBC Connection Strings
in
SQL Engine Reference
.
What do I need to do about DSNs if I port my 32-bit application to 64-bit?
If the application uses DSN-less connections that connect using “Pervasive ODBC Client Interface,” change the connection string to “Pervasive ODBC Interface.” See
ODBC Connection Strings
in
SQL Engine Reference
.
If the application uses DSNs, you must create 64-bit DSNs that connect to a named database.
What about the DSNs for the Demodata sample database installed with the database engine?
The installation of Pervasive PSQL Server 32-bit or Pervasive PSQL Workgroup creates a Client DSN for Demodata instead of an Engine DSN. The installation of Pervasive PSQL Server 64-bit creates both a 32-bit Client DSN and a 64-bit DSN for Demodata.
If you install Pervasive PSQL Client 64-bit on top of Pervasive PSQL Server 32-bit or on top of Pervasive PSQL Workgroup, no 64-bit DSNs are created. Only the DSNs created by the installation of the 32-bit database engine are present.
Similarly, if you install Pervasive PSQL Server 32-bit or Pervasive PSQL Workgroup on top of Pervasive PSQL Client 64-bit, no 64-bit DSNs are created. Only the DSNs created by the installation of the 32-bit database engine are present.
How do I run the 32-bit ODBC Administrator on a 64-bit operating system?
See
ODBC Administrator
in
SQL Engine Reference
.
Why do I not see my DSNs in ODBC Administrator?
On 64-bit Windows operating systems, 64-bit system DSNs are distinct from 32-bit system DSNs because of the registry design.
If you are using the 64-bit ODBC Administrator, you will not see the 32-bit system DSNs, and vice versa.
Note that, when the relational service interface on a 64-bit operating system receives a connection from a client to an Engine DSN, the database engine looks up the requested Engine DSN only in the 32-bit registry.
See
ODBC DSN Setup GUIs
.
What if my application uses DTI to manage DSNs?
See
DTI
.
What are the changes to ODBC Administrator?
See
ODBC DSN Setup GUIs
.
Other than ODBC Administrator, does Pervasive PSQL v11 include new utilities to support 64-bit ODBC and DSNs?
No.
Are there any changes to existing utilities to support 64-bit ODBC and DSNs?
Yes. See
Utilities Affected by ODBC Changes
.
Do some descriptor fields that can be set through the various ODBC SQLSet and SQLGet functions accommodate 64-bit values while others are still 32-bit values?
Yes, if you are using the 64-bit ODBC driver. Ensure that you use the appropriate sized variable when setting and retrieving descriptor fields. For more information, refer to the Microsoft ODBC documentation. See especially
http://msdn.microsoft.com/en-us/library/ms716287%28VS.85%29.aspx
.
A point of clarification is that SQL_ROWSET_SIZE is supported by both SQLGetStmtOption
and
SQLGetStmtAttr. If you are using the 64-bit ODBC driver and you call either SQLGetStmtOption or SQLGetStmtAttr, a 64-bit value is returned in *ValuePtr when that attribute parameter is set to SQL_ROWSET_SIZE.
Going forward, is there a recommended strategy for ODBC connections?
Yes. New or revised 32-bit applications, local or remote, should connect to a named database through a Client DSN, not to an Engine DSN. Alternately, applications could use DSN-less connections by specifying “Pervasive ODBC Client Interface.”
This positions your application for the future when Engine DSNs will no longer be supported in Pervasive PSQL.
DTI
The DTI functions for DSNs manage only 32-bit Engine DSNs. Therefore, the following DTI functions are deprecated along with the 32-bit Engine Interface ODBC driver:
•
PvCreateDSN()
•
PvCreateDSN2()
•
PvGetDSN()
•
PvGetDSNEx()
•
PvGetDSNEx2()
•
PvDeleteDSN()
•
PvListDSNs()
•
PvModifyDSN()
•
PvModifyDSN2()
All of these functions operate only on the 32-bit registry. This applies even if a 64-bit database engine is installed on a 64-bit operating system. The 32-bit ODBC Administrator uses the DTI functions for Engine DSNs. Therefore, the list of existing Engine DSNs and newly created Engine DSNs are only for the 32-bit registry.
See
Distributed Tuning Interface Guide
for an explanation of the functions that manage DSNs.
ODBC DSN Setup GUIs
The following changes apply to setting up DSNs through ODBC Administrator.
•
A new graphical user interface (GUI) is available for setting up 64-bit DSNs. See also Table
12
,
Pervasive PSQL ODBC Drivers for Windows
.
•
The GUI for setting up 32-bit Client DSNs has been modified as follows:
•
The GUI now allows selection of a local or remote server name or IP address. See also Table
12
,
Pervasive PSQL ODBC Drivers for Windows
.
•
The “Server” group box is now labeled “Connection Attributes”
•
The control labeled “Address” is now labeled “Server Name/IP.”
•
The control labeled “Data Source Name” is now labeled “Engine DSN.”
•
The “Options” button is now labeled “Advanced” and displays the advanced connection attributes. The advanced connection attributes provide the same choices as were previously available on the Options dialog.
•
The GUI for setting up Engine DSNs has been modified as follows:
•
The “Database” group box is now labeled “Connection Attributes”
•
The “Options” button is now labeled “Advanced” and displays the advanced connection attributes. The advanced connection attributes provide the same choices as were previously available on the Options dialog.
See the chapter
DSNs and ODBC Administrator
in
SQL Engine Reference
for a discussion of the new controls on the GUIs.
ODBC Header Files
The sql.h and sqltypes.h header files for ODBC contain differences for the compilation of 32-bit and 64-bit applications. Refer to the ODBC documentation on the Microsoft Web site for a discussion of 64-bit ODBC. For example, you may find the following information useful: http://msdn.microsoft.com/en-us/library/ms716287(VS.85).aspx.
Utilities Affected by ODBC Changes
For Pervasive PSQL Server and Client installations on 64-bit operating systems, Pervasive PSQL Control Center (PCC) contains separate choices for 32-bit and 64-bit ODBC Administrator. The choices are available on the Tools menu. See
Additional Utilities
in
Pervasive PSQL User's Guide
.
In addition, the option to create a DSN on the New Database dialog is now qualified for 32-bit: “Create 32-bit Engine DSN.” See
New Database GUI Reference
in
Pervasive PSQL User's Guide
. (PCC is a 32-bit application. A 64-bit version of it is not available.)
The Pervasive ODBC DSN setup GUIs have changed. See
ODBC DSN Setup GUIs
.