Copyright: , 1996 INTERSOLV


Contents, SQLBase Driver Help
	DataDirect ODBC  SQLBase Driver
About the SQLBase Driver

System Requirements

Configuring Data Sources

Connecting to SQLBase Using a Logon Dialog Box

Connecting to SQLBase Using a Connection String

Data Types

Isolation and Lock Levels Supported

ODBC Conformance Level

Number of Connections and Statements Supported

Copyright


Copyright
Copyright 1996 INTERSOLV Inc. All rights reserved. INTERSOLV is a registered trademark, and DataDirect is a trademark of INTERSOLV, Inc. Other company or product names mentioned herein may be trademarks or registered trademarks of their respective companies.


About the SQLBase Driver

The SQLBase driver supports the Gupta SQLBase database system in the Windows NT or Windows 95 environment.  It also supports Gupta's SQLHost gateway to DB2.

The driver filename is IVGUPnn.DLL.


SQLBase System Requirements
System Requirements

To communicate with the server, the SQLBase driver requires SQLAPIW.DLL and a communication DLL (for example, SQLNPIPE.DLL for Named Pipes). The directory containing these files must be on your path.

If you attempt to configure a data source and you do not have SQLAPIW.DLL on your path or in your Windows NT \SYSTEM32 or Windows \SYSTEM directory, the following message appears:

The setup routines for the INTERSOLV SQLBase ODBC driver could not be loaded.  You may be low on memory and need to quit a few applications.


Configuring SQLBase Data Sources
Configuring Data Sources

To configure a SQLBase data source, do the following:

1	Start the ODBC Administrator.  A list of data sources appears.

2	If you are configuring a new data source, click Add.  A list of installed drivers appears.  Select INTERSOLV SQLBase and click OK.

If you are configuring an existing data source, select the data source name and click Setup.

The SQLBase ODBC Setup dialog box appears.

3	Specify a data source name, a database name and optionally, a description.

4	Click the Advanced button to configure optional data source settings, such as server name and server list.

The ODBC Advanced Driver Setup dialog box appears.

5	Click Translate to perform a translation of your data from one character set to another. The Select Translator dialog box appears in which you can select a translator to peform the translation. INTERSOLV provides a translator named INTERSOLV OEM ANSI that translates your data from the IBM PC character set to the ANSI character set. Click OK to leave this dialog box and perform the translation.

The translators that are listed in this dialog box are determined by the values listed in the ODBC Translators section of your ODBCINST.INI file.

6	Click OK to write these values to ODBC.INI.  These values are now the defaults when you connect to the data source.  You can change the defaults by configuring your data source again.  You can override the defaults by connecting to the data source using a connection string with alternate values.


Connecting to SQLBase Using a Logon Dialog Box

Some ODBC applications display a logon dialog box when you are connecting to a data source.

In the Logon dialog box, do the following:

1	Optionally, type the name of the server containing the SQLBase database tables you want to access or select the name from the Server Name drop-down list, which displays the server names you specified in the Setup dialog box.  Type the word LOCAL to access a local SQLBase database.

2	Type the name of the database you want to access.  If you specified a server name, you can select the name from the Database Name drop-down list.

3	If required, type your user name.

4	If required, type your password.

5	Click OK to complete the logon and to update the values in ODBC.INI.


Connecting to SQLBase Using a Connection String

If your application requires a connection string to connect to a data source, you must specify the data source name that tells the driver which ODBC.INI section to use for the default connection information.  Optionally, you may specify attribute=value pairs in the connection string to override the default values stored in ODBC.INI.  These values are not written to ODBC.INI.

You can specify either long or short names in the connection string.  The connection string has the form:

DSN=data_source_name[;attribute=value[;attribute=value]...]

An example of a connection string for SQLBase is

DSN=SQLBASE TABLES;SRVR=IVSRVR;DB=PAYROLL;UID=JOHN;PWD=XYZZY

The following table gives the long and short names for each attribute, as well as a description.

The defaults listed in the table are initial defaults that apply when no value is specified in either the connection string or in the data source definition in ODBC.INI.  If you specified a value for the attribute when configuring the data source, that value is your default.

Attribute	Description
DataSourceName (DSN)	A string that identifies a SQLBase data source configuration in ODBC.INI.  Examples include "Accounting" or "SQLBase-Serv1."
Database (DB)	The name of the database to which you want to connect.
LogonID (UID)	The default logon ID (user name) used to connect to your SQLBase database.  If so, contact your system administrator to get your logon ID.  A logon ID is required only if security is enabled on your database.
ServerName (SRVR)	The name of the server containing the SQLBase database tables you want to access.  Specify ServerName=LOCAL if you are using the local server.
Servers (SRVRLIST)	A comma-separated list of servers with which to prompt the user in a Logon dialog box.  Specify LOCAL to add the local server to the list.
Password (PWD)	A case-sensitive password.
CursorCacheSize (CCS)	The number of cursors the cursor cache can hold.  The cursor cache increases performance and uses few database resources.  The initial default is 6.
InputMessageSize (IMS)	The number of bytes of the input message buffer.  Increasing this value retrieves more records across the network in a single fetch.  The initial default is determined by SQLBase.
LockTimeOut (LTO)	The number of seconds SQLBase should wait for a lock to be freed before raising an error.  Values can be -1 to 1800; -1 means wait forever.  The initial default is 300.
DB2IsolationLevel (DIL)	DB2IsolationLevel={CS | RR}. The DB2 isolation level SQLHost is using, provided for use with SQLHost connections.  Set DB2IsolationLevel=CS when DB2 is using the Cursor Stability isolation level; DB2IsolationLevel=RR (the default) when DB2 is using Repeatable Read.
YieldProc (YLD)	This attribute is not available in Windows NT or Windows 95. This option, which determines if you can work in other applications when SQLBase is busy.
NoRecovery (NR)	NoRecovery={0 | 1}. A value that enables or disables transaction recovery.  NoRecovery=0 (the initial default) enables recovery; NoRecovery=1 disables recovery.  NoRecovery=1 improves performance but is dangerous because your database can become inconsistent in the event of a system crash.  See your SQLBase documentation for information on this option.
ReleasePlan (RP)	ReleasePlan={0 | 1}. A number that determines whether a lock is maintained on a table when the cursors accessing the table are freed. Freeing the lock on the table results in a request to the server, which can decrease performance. When set to 0, the default, no locks on tables are freed. When set to 1, locks are freed.


SQLBase Data Types
Data Types

The SQLBase data types are mapped to the standard ODBC data types as follows:

SQLBase	ODBC
Char	SQL_VARCHAR
Date	SQL_DATE
Decimal	SQL_DECIMAL
Double Precision	SQL_DOUBLE
Integer	SQL_INTEGER
Long Varchar	SQL_LONGVARCHAR
Number	SQL_DOUBLE
Real	SQL_REAL
Smallint	SQL_SMALLINT
Time	SQL_TIME
Timestamp	SQL_TIMESTAMP
Varchar	SQL_VARCHAR
Note:  The SQLBase Real data type is replaced by Float(21) when using DB2 via the SQLHost gateway.  The Graphic, Vargraphic, and Long Vargraphic DB2 data types are not supported.


Isolation and Lock Levels Supported by SQLBase
Isolation and Lock Levels Supported

SQLBase supports isolation levels 1 (read committed, the default) and 3 (serializable).   SQLBase also supports an alternative isolation level 1 called cursor stability.  Your ODBC application can use this isolation level by calling SQLSetConnectOption (1040,1).

SQLBase supports page-level locking.


SQLBase ODBC Conformance Level
ODBC Conformance Level

The SQLBase driver supports the Core, Level 1, and Level 2 API functions listed in Supported ODBC Functions.  In addition, the following Level 2 functions are supported:

SQLBrowseConnect

SQLColumnPrivileges

SQLForeignKeys

SQLPrimaryKeys

SQLSetPos

SQLTablePrivileges

The driver also supports backward and random fetching in SQLExtendedFetch.  It supports the core SQL grammar.


Number of Connections and Statements Supported by SQLBase
Number of Connections and Statements Supported

The SQLBase database system supports multiple connections and multiple statements per connection.


SQLBase ODBC Setup
SQLBase ODBC Setup Dialog

Use the SQLBase ODBC Setup dialog to create new SQLBase data sources or configure existing data sources.

Data Source Name:  A string that identifies this SQLBase data source configuration in ODBC.INI.  Examples include "Accounting" or "SQLBase-Serv1."

Description:  An optional long description of a data source name.  For example, "My Accounting Database" or "SQLBase on Server number 1."

Database Name:  The name of the database to which you want to connect by default.

Advanced: Displays the ODBC Advanced Driver Setup dialog box to configure optional data source settings, such as file caching.

OK

Creates or modifies the current data source using the options you specify.

Cancel

Exits the ODBC Setup dialog without creating or modifying a data source.


Advanced Options for Configuring Data Sources
Advanced Dialog

To configure optional settings for a SQLBase data source, specify values as follows:

Server Name:  The name of the server that contains the desired database.  Specify the word LOCAL if you are using the local server.

The server name is not required to log on.  The logon dialog box appears more quickly if you do not specify a server name.  If you do specify a server name, the Database Name drop-down list in the logon dialog box is populated with the names of the databases available on that server.

Server List:  A comma-separated list of servers that will appear in the Logon dialog box.  Specify LOCAL to add the local server to the list.

Default User Name:  The default user name used to connect to your SQLBase database.  A user name is required only if security is enabled on your database.  Your ODBC application may override this value or you may override this value in the logon dialog box or connection string.

Cursor Cache Size:  The number of cursors the cursor cache can hold.  The default is 6.

Yield Proc:  This attribute is not available in Windows 95 or Windows NT. A numeric value that determines whether you can work in other applications when SQLBase is busy.

Input Message Size:  The number of bytes in the input message buffer.  The default is determined by SQLBase.  Increasing this value retrieves more records across the network in a single fetch.

Lock Time Out:  The number of seconds SQLBase should wait for a lock to be freed before raising an error.  Values can be -1 (wait forever) to 1800; the default is 300.

No Recovery:  Select this check box to disable transaction recovery.  Selecting this box is dangerous because your database can become inconsistent in the event of a system crash.

Release Plan:  A number that determines whether a lock is maintained on a table when the cursors accessing the table are freed. Freeing the lock on the table results in a request to the server, which can decrease performance. No locks are freed when this option is set to the default, 0. Locks are freed when this option is set to 1.

Translate

Displays the Select Translator dialog box to allow you to perform a translation of your data from one character set to another. Choose the INTERSOLV OEM ANSI translator to translate your data from the IBM PC character set to the ANSI character set.

Close

Returns to the SQLBase ODBC Setup dialog box where you can click the OK button to write these settings to the ODBC.INI file.


Logon to SQLBase

Server Name:  Optionally, type the name of the server containing the SQLBase database tables you want to access or select the name from the Server Name drop-down list, which displays the server names you specified in the Setup dialog box. Type the word LOCAL to access a local SQLBase database system.

Database Name:  Type the name of the database you wish to access or select the name from the the Database Name drop-down list.

User Name:  If required, type your user name.

Password:  If required, type your password.