PreviousGetting Started with Pervasive PSQL v9 SP2 (9.5) (Server Edition) (v9 SP2 (9.5) revision 1) Next

Client Information

Chapter contents

A Pervasive PSQL Client can connect to any of the Pervasive PSQL Servers provided the client and server machines can communicate with a shared protocol. Because of such commonality, the majority of information about client communications is consolidated in a single chapter. See Connecting Clients to a Sample Database . In addition to that chapter, this section includes information specific to Linux.

Authentication to Remote Machines

To connect to a remote machine using the Linux client, you need to have authentication to the remote machines. This is accomplished by entering a specific username and password for the server using the pvnetpass utility. This utility enters the username and password for that particular server in the Pervasive registry on the client machine. If you do identify user names and passwords, your applications can receive status code 3119.

See pvnetpass in Pervasive PSQL User's Guide.

Creating a Client DSN

A client data source name (DSN) is required if applications on the client use the Pervasive PSQL relational interface through ODBC. To create a client DSN, you use the dsnadd utility included with the Pervasive PSQL Client for Linux. See dsnadd in Pervasive PSQL User's Guide and the man page for dsnadd located in /usr/local/psql/man/man1.

Internationalization with the Client

This subsection discusses encoding issues and the level of support for internationalization when using the Pervasive PSQL Client for Linux.

Btrieve

When using the Btrieve API, you must provide file names and paths in EUC-JP or another encoding used in your application. The client converts this to UTF8 when passing the request to the server, and then the server converts the UTF8 encoding to the local encoding.

ODBC

When using ODBC, Win32 encoding is expected to be SHIFT-JIS.

Japanese versions of Linux by default have their encodings typically set to EUC-JP or UTF8.

When using Japanese versions of Linux, a client can connect to another Linux server (for example, locally), or to a Win32 SHIFT-JIS server. It is also possible to connect to a database encoded in SHIFT-JIS but located on a Linux server.

Use the following instructions for your listed configuration. In each case, it is assumed that the application itself does not do any conversion and uses the encoding that is native for the machine.

Connecting a Linux EUC-JP Client to a Win32 SHIFT-JIS Server

The server requires that everything is received as SHIFT-JIS. The client requires that the server send everything as EUC-JP.

To accomplish this, the client DSN settings in ODBC.INI (located by default in /usr/local/psql/etc) used to connect to the given database should be set up as follows:

[dbclient] 
Driver=/usr/local/psql/lib/libodbcci.so 
Description=Pervasive ODBC Client Interface: JPN-
2000SERVER:1583/dbclient 
ServerDSN=DEMODATA 
ServerName=JPN-2000SERVER:1583 
TranslationDLL=/usr/local/psql/lib/libxlate.so.9 
TranslationOption=90000932 

The TranslationDLL line specifies the translation library that the ODBC client interface should use.

The TranslationOption line specifies that the translation needs to occur from 9000 (representing EUC-JP) to 0932 (representing SHIFT-JIS).

Using this example, all data coming from the client will be translated into SHIFT-JIS before it gets to the server, and to EUC-JP before the data is received by the client.

Connecting a Linux UTF8 Client to a Win32 SHIFT-JIS Server

The server requires that everything is received as SHIFT-JIS. The client requires that the server send everything as UTF8.

To accomplish this, the client DSN settings in ODBC.INI ( by default in /usr/local/psql/etc ) used to connect to the given database should be set up as follows:

[dbclient]  
Driver=/usr/local/psql/lib/libodbcci.so  
Description=Pervasive ODBC Client Interface: JPN-
2000SERVER:1583/dbclient  
ServerDSN=DEMODATA  
ServerName=JPN-2000SERVER:1583  
TranslationDLL=/usr/local/psql/lib/libxlate.so.9  
TranslationOption=90010932  

The TranslationDLL line specifies the translation library that the ODBC client interface should use.

The TranslationOption line specifies that the translation needs to occur from 9001 (representing UTF8) to 0932 (representing SHIFT-JIS).

Using this example, all data coming from the client will be translated into SHIFT-JIS before it gets to the server, and to UTF8 before the data is received by the client.

Connecting a Linux EUC-JP Client to a Linux EUC-JP Server

Using this configuration, no changes to the DSN description are needed. Use the DSN as it was created by the dsnadd utility.

Connecting a Linux UTF-8 Client to a Linux UTF-8 Server

Using this configuration, no changes to the DSN description are needed. Use the DSN as it was created by the dsnadd utility.

Connecting a Linux UTF-8 Client to a Linux EUC-JP Server

The server requires that everything is received as EUC-JP. The client requires that server send everything as UTF-8.

To accomplish this, the client dsn settings in ODBC.INI ( by default in /usr/local/psql/etc ) used to connect to the given database should be set up as follows:

[dbclient]  
Driver=/usr/local/psql/lib/libodbcci.so  
Description=Pervasive ODBC Client Interface: JPN-
2000SERVER:1583/dbclient  
ServerDSN=DEMODATA  
ServerName=JPN-2000SERVER:1583  
TranslationDLL=/usr/local/psql/lib/libxlate.so.9  
TranslationOption=90019000  

The TranslationDLL line specifies the translation library that the ODBC client interface should use.

The TranslationOption line specifies that the translation needs to occur from 9001 (representing UTF-8) to 9000 (representing EUC-JP).

Using this example, all data coming from the client will be translated into EUC-JP before it gets to the server, and to UTF-8 before the data is received by the client.

Connecting a Linux EUC-JP Client to a Linux EUC-JP Server, with SHIFT-JIS Encoding Used to Store Data on the Server

This situation is possible if you have a SHIFT-JIS database on a Win32 engine, and you want to move all the files to the Linux EUC-JP server. In this case, the database resides on a EUC-JP Linux machine, but all the data inside the DDF files and data files are in SHIFT-JIS.

In this case, your DSN should be set up as follows:

[dbclient] 
Driver=/usr/local/psql/lib/libodbcci.so 
Description=Pervasive ODBC Client Interface: JPN-
2000SERVER:1583/dbclient 
ServerDSN=DEMODATA 
ServerName=JPN-2000SERVER:1583 
TranslationDLL=/usr/local/psql/lib/libxlate.so.9 
TranslationOption=90000932 
CodePageConvert=932 

The last line specifies that even though the server uses EUC-JP encoding, it should treat the data on the server as SHIFT-JIS.

DTI

The Distributed Tuning Interface (DTI) requires that you use SHIFT-JIS encoding. The DTI is part of the Pervasive PSQL Software Development Kit (SDK) and is documented in the SDK manuals.


Chapter contents
Book contents

Prev topic: Configuration
Next topic: Setting Up Web-based Data Access