Copyright: , 1996 INTERSOLV


Contents, SQL Server 6 Driver Help
	DataDirect ODBC  SQL Server 6 Driver
About the SQL Server 6 Driver

System Requirements

Configuring Data Sources

Connecting to SQL Server 6 Using a Logon Dialog Box

Connecting to SQL Server 6 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 SQL Server 6 Driver

The SQL Server 6 driver supports the SQL Server 6 database system available from Microsoft, Inc.

The driver filename is IVSS6nn.DLL.


SQL Server 6 System Requirements
System Requirements

To use the SQL Server 6 driver, you must have the appropriate Microsoft SQL Server DB-Library and Net-Library, version 6.0, installed.

Note: The DataDirect SQL Server 6 driver for Windows NT and Windows 95 requires Microsoft client software; it does not work with Sybase System 10 software.

Your database must support catalog stored procedures.

The DB-Library for Windows NT or Windows 95 is NTWDBLIB.DLL. The Net-Library you need depends on the network protocol used to connect to SQL Server 6.  For example, Named Pipes requires DBNMPNTW.DLL. Contact your Microsoft SQL Server vendor to obtain the appropriate DB-Library and Net-Library.

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

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


Configuring SQL Server 6 Data Sources
Configuring Data Sources

To configure a SQL Server 6 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 SQLServer and click OK.

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

The SQL Server 6 ODBC Setup dialog box appears.

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

4	Click the Advanced button to configure optional data source settings, such as server list and database 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 SQL Server 6 Using a Logon Dialog Box

Some ODBC applications display a logon dialog box when you are connecting to a data source.  In these cases, the data source name has already been specified.

In the Logon dialog box, do the following:

1	Type the name of the server containing the SQL Server 6 database tables you want to access (case-sensitive) or select the name from the Server Name drop-down list, which displays the server names you specified in the setup dialog box.

2	If required, type your case-sensitive login ID.

3	If required, type your case-sensitive password for the system.

4	Optionally, click Options to display the SQL Server 6 Logon Options dialog box and specify the initial SQL Server 6 database to connect to and the name of your workstation.

5	Click OK to log on to the SQL Server 6 database installed on the server you specified and to update the values in ODBC.INI.


Connecting to SQL Server 6 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 SQL Server 6 is

DSN=Accounting;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 SQL Server 6 data source configuration in ODBC.INI.  Examples include "Accounting" or "SQL Server 6-Serv1."
ServerName (SRVR)	The name of the server containing the SQL Server 6 tables you want to access.
Database (DB)	The name of the database to which you want to connect.
LogonID (UID)	The case-sensitive logon ID used to connect to your SQL Server 6 database.  A logon ID is required only if security is enabled on your database.  If so, contact your system administrator to get your logon ID.
Password (PWD)	A case-sensitive password.
Language (LANG)	The national language to be used by the client.  The initial default is English.
ApplicationName (APP)	The name SQL Server 6 uses to identify your application.
WorkstationID (WKID)	The workstation ID used by the client.
CursorCacheSize (CCS)	The number of cursors the cursor cache can hold.  The driver creates a cache of statements; each statement represents an open connection to SQL Server 6.  The cursor cache increases performance but uses database resources.  The initial default is 1.
YieldProc (YLD)	Not available in Windows 95 and Windows NT. A numeric value that determines if you can work in other applications when SQL Server 6 is busy.
CharConv (CC)	A value that controls the character set conversion between SQL Server 6 (version 4.8 or later) and a client application.  Common values include iso-1 for ISO-8859-1, cp850 for Code Page 850, roman8 for the Roman8 character set, and SJIS for a Japanese character set.  See your SQL Server 6 documentation for a complete list of values.
Cancel (CAN)	Cancel={0 | 1 | 2}. A value that specifies how a previously executed statement should be canceled.  Valid values are Cancel=0 fetches all remaining records if the statement was a Select. Cancel=1 cancels the statement by calling dbcancel.  Set Cancel=1 if dbcancel is supported in your client/server configuration.  This is the initial default. Cancel=2 closes the connection to the server for the statement.  Set Cancel=2 only if dbcancel is not supported for your configuration and the performance of fetching all remaining records is unacceptable.
Gateway (GW)	Gateway={0 | 1}. A value that specifies whether you are using the Sybase Net-Gateway to access a DB2 database with this data source.  Set Gateway=1 if this is the case.  Otherwise, set Gateway=0 (the initial default).
TwoPhaseCommit (TPC)	TwoPhaseCommit={0 | 1}. This attribute lets you have two or more active statements within a transaction, using the SQL Server 6 two-phase commit services.  Set TwoPhaseCommit=1 to use two-phase commit.  The active statements may deadlock if they reference the same SQL Server 6 table.  Otherwise, set TwoPhaseCommit=0 (the initial default).
Netapi (NAPI)	Netapi={0 | 1}. A value that specifies whether NETAPI.DLL is available.  Netapi=0, the initial default, indicates it is not available; Netapi=1 indicates it is available.  If you supply a value for the WorkstationID attribute, this attribute is ignored.
ModifySQL (MS)	ModifySQL={0 | 1}. This attribute is provided for backward compatibility.  It determines whether the driver modifies SQL statements to conform to ODBC specifications or passes the SQL statement directly to SQL Server 6.  Specify ModifySQL=1 to have the driver modify the SQL statement to conform to ODBC specifications.  Specify ModifySQL=0 to have the driver understand SQL dialects found in earlier drivers.  The default is 1.


SQL Server 6 Data Types
Data Types

The SQL Server 6 data types are mapped to the standard ODBC data types as follows:

SQL Server 6	ODBC Data Type
binary	SQL_BINARY
bit	SQL_BIT
char	SQL_CHAR
datetime	SQL_TIMESTAMP
float	SQL_FLOAT
image	SQL_LONGVARBINARY
int	SQL_INTEGER
money	SQL_DECIMAL
real	SQL_REAL
smalldatetime	SQL_TIMESTAMP
smallint	SQL_SMALLINT
smallmoney	SQL_DECIMAL
sysname	SQL_VARCHAR
text	SQL_LONGVARCHAR
timestamp	SQL_VARBINARY
tinyint	SQL_TINYINT
varbinary	SQL_VARBINARY
varchar	SQL_VARCHAR


Isolation and Lock Levels Supported by SQL Server 6
Isolation and Lock Levels Supported

SQL Server 6 supports isolation levels 1 (read committed) and 3 (serializable).  SQL Server 6 supports page-level locking.


SQL Server 6 ODBC Conformance Level
ODBC Conformance Level

The SQL Server 6 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

SQLProcedureColumns

SQLProcedures

SQLTablePrivileges

The driver supports the minimum SQL grammar.


Number of Connections and Statements Supported by SQL Server 6
Number of Connections and Statements Supported

The SQL Server 6 database system supports multiple connections.  With two-phased commit, SQL Server 6 supports multiple statements per connection.  Otherwise, SQL Server 6 supports a single statement per connection if SQL_AUTOCOMMIT is 0 and multiple statements per connection if SQL_AUTOCOMMIT is 1.


SQL Server 6 ODBC Setup
SQL Server 6 ODBC Setup Dialog

Use the SQL Server 6 ODBC Setup dialog to create new SQL Server 6 data sources or configure existing data sources.

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

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

Server Name:  The name of the server that contains the desired database.

Database Name:  The name of the database to which you want to connect by default.  If you do not specify a value, the default database defined by SQL Server 6 is used.

Advanced

Displays the ODBC Advanced Driver Setup dialog box to configure optional data source settings, such as server name.

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 SQL Server 6 data source, specify values as follows:

Server List:  A comma-separated list of servers that will appear in the logon dialog box.

Database List:  The databases that will be available in the SQL Server 6 Logon Options dialog box.  Separate the names with commas.

Default Logon ID:  The default logon ID used to connect to your SQL Server 6 database.  This ID is case-sensitive. A logon ID 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.

Language:  The national language to be used by the client.  The default is English.

Application Name:  The name SQL Server 6 uses to identify your application.

Workstation ID:  The workstation ID used by the client.

Cursor Cache Size:  The number of cursors the cursor cache can hold.  The driver creates a cache of statements; each statement represents an open connection to SQL Server 6.  The cursor cache increases performance but uses database resources.  The default is 1 (one cursor).

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

Character Conversion:  This value controls the character set conversion between SQL Server 6 (version 4.8 or later) and a client application.  If you omit this value, no character conversion takes place on your server.

Common values include iso-1 for ISO-8859-1, cp850 for Code Page 850, roman8 for Roman8 character set, and SJIS for a Japanese character set.  See your SQL Server 6 documentation for a complete list of values.

Cancel Behavior:  A value that specifies how a previously executed statement should be canceled.  Valid values are

0 fetches all of the remaining records if the statement was a Select.

1 cancels the statement by calling dbcancel.  This is the default and should be used if dbcancel is supported in your client/server configuration.

2 closes the connection to the server for the statement.  Use this value only if dbcancel is not supported for your configuration and the performance of fetching all remaining records is unacceptable.

Two-Phase Commit:  This check box, when selected, enables you to have two active statements within a transaction, using the SQL Server 6 two-phase commit services.  The active statements may deadlock if they reference the same SQL Server 6 table.

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 SQL Server 6 ODBC Setup dialog box where you can click the OK button to write these settings to the ODBC.INI file.


Logon to SQL Server 6

Server Name:  Type the name of the server containing the SQL Server 6 database tables you want to access (case-sensitive) or select the name from Server Name box, which displays the server names you specified in the Setup dialog box.

Login ID:  If required, type your Login ID (case-sensitive).

Password:  If required, type your password for the system (case-sensitive).


SQL Server 6 Logon Options

Database Name:  Type the name of the initial SQL Server 6 database to connect to or select the name from the drop-down list. If not supplied, the default database defined by SQL Server 6 is used.

Workstation ID:  Type the name of your workstation.