# Microsoft Data Access Components version 2.5 Readme

This document contains information about technical issues, known bugs, and limitations for the Microsoft® Data Access Components version 2.5.

The MDAC typical redistribution installation contains the core components (ADO, OLE DB, and ODBC) and additional OLE DB providers and ODBC drivers for various data stores. For information about the MDAC SDK, which includes documentation, samples, tools, headers, and libraries, see the section in this readme about MDAC technical issues.

## Contents

### Technical Issues, Known Bugs, and Limitations

- MDAC
- ADO and RDS
- ADOX
- ADO MD
- JRO
- Microsoft Data Link API
- OLE DB
- OLE DB Service Components
- OLE DB for Online Analytical Processing (OLAP)
- OLE DB Provider for ODBC
- OLE DB Provider for Oracle
- OLE DB Provider for SQL Server
- OLE DB Provider for Microsoft Jet
- Data Shaping Service for OLE DB
- Open Database Connectivity (ODBC)
- ODBC Driver for Oracle
- ODBC Data Source Administrator
- ODBC Desktop Database Drivers
- SQL Server Client Data Access Components
- Visual FoxPro ODBC Driver

# Technical Issues, Known Bugs, and Limitations

# MDAC

MDAC Filelist available in the MDAC Release Manifest

You can find the complete list of MDAC files in the Release Manifest, located at http://www.microsoft.com/data/download.htm.

How to Install the MDAC 2.5 SDK from the Platform SDK

You can install the Platform SDK in its entirety or as separate components from the MSDN Online Web site: http://msdn.microsoft.com/developer/sdk/platform.asp. An installation wizard will guide you through the process. Because other applications share Data Access components, you must close all other applications before installing the Platform SDK.

The Platform SDK Setup Wizard allows you to choose typical or custom installation. A typical installation downloads the entire SDK, while a custom installation allows you to choose specific components: documentation, build environment, debuggers, tools, samples and source code, redistributable components, and other material. For Data Access components, you can choose to install any portion of the MDAC SDK: the APIs, documentation, samples, and so on. If you install the MDAC SDK, we recommend that you also choose to update your build environment through the installation process in order to keep the components synchronized.

HTML Help Files Require Updated HHCTRL.ocx on Windows NT 4.0

If you are using Microsoft® NT 4.0 Service Pack 3, MDAC 2.5 will require an updated version of Hhctrl.ocx to properly display HTML Help files. Install the HTML Help update from the following location in the MSDN Online Web Workshop: http://msdn.microsoft.com/workshop/author/htmlhelp/localize.asp. Select the appropriate language for your platform.

MDAC Dependencies

New functionality in OLE DB Core Services (Oledb32.dll), and thus in the MDAC stack, depends on two other .dlls that have shipped in versions of Internet Explorer, namely:

- The Internet services exposed in Wininet.dll. Oledb32.dll will not load unless Wininet.dll, which began shipping in Internet Explorer version 3.0, is also installed.
- The OLE DB version 2.5 Root Binder also depends on Urlmon.dll that began shipping in Internet Explorer version 4.0. If Internet Explorer 4.0 is not installed, or if Urlmon.dll is not installed, the Root Binder will return E_FAIL on calls to IBindResource::Bind. This would impact consumers' applications that are written to consume the new IBindResource interface introduced in OLE DB 2.5. This error would be returned to ADO when an object is opened with a URL instead of with a connection string.

Errors with SQL Server

If you install MDAC 2.5 on a computer running applications that access SQL Server 6.5 through the Microsoft OLE DB Provider for SQL Server or the Microsoft SQL Server ODBC Driver, and if the catalog stored procedures installed on that Microsoft SQL Server 6.5 are not current, the provider or driver will generate the following warning messages:

- OLE DB Provider for SQL Server: The catalog stored procedures installed on server are version <version#; version <version# or later is required to support IDBSchemaRowset. Please contact your system administrator.
- SQL Server ODBC Driver: The ODBC catalog stored procedures installed on server re version <version#; version <version# or later is required to ensure proper operation. Please contact your system administrator.

If an application ignores this message, it may experience some problems (such as loss of schema information).

To correct this:

- You must install instcat.sql, that comes with MDAC 2.5 on the 6.5 server

  - OR -

- Install SQL Server 6.5 SP5 on the server. Installing SQL Server 6.5 SP5 automatically runs instcat.sql.

Return to MDAC Table of Contents

# ADO/RDS

This following provides late-breaking or other information that supplements the Microsoft ADO documentation.

ADO/RDS Technical Issues

ADO/RDS Known Bugs and Limitations

## Technical Issues

Microsoft Internet Explorer Version 5.0 and XML

Microsoft® Internet Explorer 5.0 is required to open a Recordset from an XML file.

Changes to the ADO 2.5 Fields Collection Since Windows 2000 Beta 2

To enhance performance in ADO, additions and deletions to the Fields collections of the Record object, as well as changes to the value of an existing field, are cached until the Update method is called. When Update is called, all the changes are all made as a batch.

Each field has a Status property, and if an error occurs during an update, the Status property enables you to determine which fields have been successfully added, deleted, or changed. Fields with a pending status will not be committed if a Record object is closed, or goes out of scope before Update is called.

Two methods have been added for the Fields collection: Resync and CancelUpdate. An additional parameter has been added to the Append method which allows you to specify the value of a field when you append it. The Resync method retrieves current values for fields from the server, and it takes ResyncEnum as its sole parameter (default value is adResyncAllValues). Resync does not affect deleted fields. Deleted fields are still visible in the local cache until they are successfully deleted on an Update call. The Fields.Count property also does not change on a field deletion until Update is called and the field has been successfully deleted.

The Field object of the Record object has three new properties, Status, OriginalValue, and UnderlyingValue. The Status property of the Field object indicates the current state of the field, that is, adFieldPendingUpdate for a field that has new value but for which Update has not yet been called. OriginalValue and UnderlyingValue are similar to the same properties on the Recordset object's Field object.

Changes to ADO 2.5 URL Binding Since Windows 2000 Beta 2

To simplify URL binding, you can use "URL=" in a connection string. For example:

    rec.Open "someDirectory", "URL=http://someComputer/someFolder/", adModeReadWrite

The following constants have been eliminated: adOpenURLBind, adCmdURLBind, and adOpenStreamFromURL.

Change in Setup: RDS DataFactory Set to Safe Mode During Setup

The Remote Data Service (RDS) setup has changed in MDAC 2.5. The RDS DataFactory is now automatically set to "safe" mode for both upgrades and clean installations of Windows 2000. (MDAC 2.5 ships with Windows 2000.) Previously, MDAC setup did not change the DataFactory settings of an existing RDS installation.

This change only applies to Windows 2000. If you install MDAC 2.5 on a computer running Windows NT 4.0 or Windows 95/98, there is no change in setup behavior. On these systems, existing DataFactory settings are preserved when upgrading to MDAC 2.5.

Note Setup for MDAC 2.5 or later will set the DataFactory to "safe" mode only once, during the first installation. Therefore, if a computer running Windows NT 4.0 or Windows 98/95 receives a clean installation (no prior versions of MDAC have been installed) of MDAC 2.5 or later AND the DataFactory is later configured for "unrestricted" use, then the configuration will be maintained when the computer is upgraded to Windows 2000. For the same reason, upgrading from one Release Candidate 3 or later version of Windows 2000 to another, or to a later version of MDAC, will not change the "safe" mode configuration again.

MSADC Virtual Root Defaults to "Access Denied"

Starting with Build 2168 of Windows 2000, after a clean install the MSADC virtual root will default to "access denied" for all IP addresses and Domain Names. This means that, on clean installs, no computers will be able to connect to the MSADC vroot on these computers and, therefore, all RDS applications will not work until the steps below are taken.

Please note that if you upgrade to build 2168 or greater of Windows 2000 from a Windows NT 4.0 machine or an earlier build of Windows 2000, the current settings for MSADC vroot will be preserved and the steps below are unnecessary.

To enable RDS, the server administrator must follow these steps:

1. Click Start, point to Programs, and then point to Administrative Tools. Click Internet Services Manager.
2. Expand the <computer name> in the left pane.
3. Expand the "Default Web Site."
4. Right-click on the "MSADC" virtual directory and select Properties.
5. On the Directory Security tab, under IP address and domain name restrictions, click Edit. The IP Address and Domain Name Restrictions dialog box will appear.
6. To enable RDS-based applications and pages on this server, do either of the following:
   - If you want all clients to access RDS-based pages and applications, select Granted Access.
   - If you want to grant access only to selected clients, click Add to enter their IP addresses or domain names. For more information about setting IP address and domain name restrictions, see the IIS documentation.

## Known Bugs and Limitations

Client Cursor Engine and OLE DB 2.5 Interfaces

The Client Cursor Engine does not implement the OLE DB 2.5 interfaces. As a result, if you open a Recordset on a version 2.5 OLE DB provider and specify adUseClient as the CursorLocation, certain properties will not be accurate, for example, RecordCount will always return -1.

Extended Properties in the Data Shaping Service and Remoting Provider

When using the Data Shaping Service for OLE DB or the OLE DB Remoting provider, the "Extended Properties" property value is available even when "Persist Sensitive Authinfo" is false. Users should be aware that the "Extended Properties" property is not secure and should avoid putting sensitive information into extended properties. When using the Data Shaping Service via service components (as ADO does), the extended properties can be set in two ways:

- The user can explicitly set the "Extended Properties".
- If the Data Shaping Service does not support any properties specified in the connection string , the service components will put them into "Extended Properties".

Note The PWD property of the Microsoft OLE DB Provider for ODBC is a provider-specific property that is not supported by the Data Shaping Service or the Remoting Provider. This means that service components will put the PWD property into the "Extended Properties" property and it will not be secure. Users are encouraged to use "PASSWORD=" instead of "PWD=" in the connection string.

Opening a Record from a URL

When using a URL to open a Record, you must use forward slashes rather than back slashes. For example, the following code will work correctly:

    Dim r As New Record
    r.Open "SomeDirectory", "url=http://someComputer/someFolder"

However, the following code will cause an error:

    Dim r As New Record
    r.Open "SomeDirectory", "url=http:\\someComputer\someFolder"

Blocking Operations

If you specify adAsyncFetchNonBlocking as an option, the Open method will not operate asynchronously, but rather will block until the operation completes.

Stream Object Does Not Correctly Handle Some Character Sets

Some characters have different sizes when in a sentence than when not in a sentence. This causes problems for the Stream object when attempting to determine the length of a string. Character sets affected include ISO-2022-JP, ISO-2022-KR, HZ-GB-2312, and UTF-7.

Change in Error for Opening Connections with Non Existent .udl Files

When you try to open a Connection using a path to a .udl file that does not exist, you will receive a "File not found" error. This is a change from previous versions of ADO in which you would receive a "Provider not found" error.

Opening and Closing a Record Creates an Empty File

If you create a file using the Record object's Open method with the OLE DB Provider for Internet Publishing, a two-byte file will be created. That is, if you immediately close the Record, you will have a file with a size of two bytes.

Errors with the OLE DB Provider for ODBC

When using the OLE DB Provider for ODBC and accessing a BLOB column in a Recordset, you can not mix the methods used to access the data. That is, you can not access a field's value with the GetChunk method for part of the data and then use the Value property to get the rest of the data. For example, you will receive an error on the second line of code in the following example:

    v = rs("BlobColumn").GetChunk(10)
    Debug.Print rs("BlobColumn").Value

If you use GetChunk to start reading a BLOB column you must continue to do so. Mixing the GetChunk method and the Value property will result in error -2147217887.

Return to MDAC Table of Contents

# ADOX

The following provides late-breaking or other information that supplements the Microsoft ADO Extensions for DDL and Security (ADOX) documentation.

ADOX Technical Issues

ADOX Known Bugs and Limitations

## Technical Issues

Required/Optional Properties of Tables, Indexes, and Columns

Your data provider may support not all properties of Table, Index, and Column objects. An error will occur if you have set a value for a property that is not supported by the provider. For new Table, Index, or Column objects, the error will occur when the object is appended to the collection. For existing objects, the error will occur when setting the property.

When creating Table, Index, or Column objects, the existence of an appropriate default value for an optional property does not guarantee that the property is supported by your provider. For more information about which properties your provider supports, see your provider documentation.

Using ADOX with Microsoft OLE DB Providers

Certain features of ADOX are unsupported, depending upon your OLE DB data provider. ADOX is fully supported with the OLE DB Provider for Microsoft Jet. The unsupported features with the Microsoft OLE DB Provider for SQL Server, the Microsoft OLE DB Provider for ODBC, or the Microsoft OLE DB Provider for Oracle are listed below. ADOX is not supported by any other Microsoft OLE DB providers.

7. Microsoft OLE DB Provider for SQL Server All ADOX objects, collections, properties, and methods are supported except for those listed here:
   - Catalog: Create method.
   - Tables: Properties for existing tables are read-only (properties for new tables can be read/write).
   - Views: Not supported.
   - Procedures: Append method, Delete method, Command property.
   - Keys: Append method, Delete method.
   - Users: Not supported.
   - Groups: Not supported.
8. Microsoft OLE DB Provider for ODBC All ADOX objects, collections, properties, and methods are supported except for those listed here:
   - Catalog: Create method.
   - Tables: Append method, Delete method. Properties for existing tables are read-only (properties for new tables can be read/write).
   - Views: Append method, Delete method, Command property.
   - Procedures: Append method, Delete method, Command property.
   - Indexes: Append method, Delete method.
   - Keys: Append method, Delete method.
   - Users: Not supported.
   - Groups: Not supported.
9. Microsoft OLE DB Provider for Oracle All ADOX objects, collections, properties, and methods are supported except for those listed here:
   - Catalog: Create method.
   - Tables: Append method, Delete method. Properties for existing tables are read-only (properties for new tables can be read/write).
   - Views: Append method, Delete method, Command property.
   - Procedures: Append method, Delete method, Command property.
   - Indexes: Append method, Delete method.
   - Keys: Append method, Delete method.
   - Users: Not supported.
   - Groups: Not supported.

## Known Bugs and Limitations

There are no known bugs or limitations at this time.

Return to MDAC Table of Contents

# ADO MD

The following provides late-breaking or other information that supplements the Microsoft ADO MD documentation.

## Technical Issues

There are no technical issues at this time.

## Known Bugs and Limitations

There are no known bugs or limitations at this time.

Return to MDAC Table of Contents

# JRO

The following provides late-breaking or other information that supplements the Microsoft Jet and Replication Objects documentation.

JRO Technical Issues

JRO Known Bugs and Limitations

## Technical Issues

There are no technical issues at this time.

## Known Bugs and Limitations

Databases made replicable in code that have never been opened in Microsoft Access will always have local projects (forms, reports, macros, modules) and they can never be changed to make the project replicable. This is because the system table that controls this functionality (mSysAccessObjects) does not exist if the database was never opened in Access prior to making the database replicable. Once the database is made replicable, the user cannot change the replicability of the project.

Return to MDAC Table of Contents

# Microsoft Data Link API

The following provides late-breaking or other information that supplements the Microsoft Data Link API documentation.

Microsoft Data Link Technical Issues

Microsoft Data Link Known Bugs and Limitations

## Technical Issues

There are no technical issues at this time.

## Known Bugs and Limitations

Only One Instance of PromptDataSource Allowed

Only one instance of the Data Link Properties dialog box can be open at a given time. Calling IDBPromptInitialize::PromptDataSource to create a second object without releasing the first will cause unpredictable results.

Creating Remote or Out-of-Process Providers is Not Supported

The version 2.5 release of the Data Link API does not support creating remote or out-of-process providers. Calling IDataInitialize::CreateDBInstanceEx, and similar methods, for anything other than an in-process provider will fail.

Shared Exclusive Flag Translates to Share Deny Read and Share Deny Write

The DB_MODE_SHARE_EXCLUSIVE flag is the resulting value when DB_MODE_SHARE_DENY_READ and DB_MODE_SHARE_DENY_WRITE are combined by OR. If DB_MODE_SHARE_EXCLUSIVE is set on input, the Data Link user interface will show "Share Deny Read" and "Share Deny Write" as checked, but "Share Exclusive" will not be checked.

Return to MDAC Table of Contents

# OLE DB

The following provides late-breaking or other information that supplements the Microsoft OLE DB documentation.

OLE DB Technical Issues

OLE DB Known Bugs and Limitations

## Technical Issues

Ignore 64-bit Data Type Support in Oledb.h

In the Oledb.h header file, ignore conditional preprocessor directives that generate support for 64-bit data types. The directives test for the value, _WIN64, and generate support for features that will be introduced in a future release.

## Known Bugs and Limitations

There are no known bugs or limitations at this time.

Return to MDAC Table of Contents

# OLE DB Service Components

The following provides late-breaking or other information that supplements the Microsoft OLE DB Service Components documentation.

OLE DB Service Components Technical Issues

OLE DB Service Components Known Bugs and Limitations

## Technical Issues

Session Pooling Should Not Be Used with SSPROP_ENABLEFASTLOAD

When using the OLE DB Provider for SQL Server, the provider-specific property SSPROP_ENABLEFASTLOAD can be used to obtain a special form of the OLE DB Session object, one that supports the IRowsetFastLoad interface. However, when using this property, session pooling should not be used. When session pooling is enabled, the Session object returned to the consumer may be taken from a pool. Because the existing session may not have been created with SSPROP_ENABLEFASTLOAD, it may not support the IRowsetFastLoad interface.

## Known Bugs and Limitations

There are no known bugs or limitations at this time.

Return to MDAC Table of Contents

# OLE DB for Online Analytical Processing (OLAP)

The OLE DB for OLAP release notes provide late-breaking or other information that supplements the Microsoft OLE DB for OLAP documentation.

OLE DB for OLAP Technical Issues

OLE DB for OLAP Known Bugs and Limitations

## Technical Issues

There are no technical issues at this time.

## Known Bugs and Limitations

There are no known bugs or limitations at this time.

Return to MDAC Table of Contents

# OLE DB Provider for ODBC

The following provides late-breaking or other information that supplements the Microsoft OLE DB Provider for ODBC documentation.

OLE DB Provider for ODBC Technical Issues

OLE DB Provider for ODBC Known Bugs and Limitations

## Technical Issues

There are no technical issues at this time.

## Known Bugs and Limitations

dwFlags on IAccessor::CreateAccessor

This provider ignores dwFlags when calling IAccessor::CreateAccessor and will not validate or honor settings for DBBINDFLAGS_HTML or any other flag in this field. The consumer should still set dwFlags to 0.

Server Options are Reset when Service Components are Enabled

The resource pooling implementation of the OLE DB Service Components does not reset server options when returning a data source and session to the pool. For example, if the command SET QUOTED_IDENTIFIER OFF is sent to SQL Server on a session, and that session is returned to the pool, the server option is not reset. Thus the consumer may select an active connection from the pool that has certain server options set differently than intended. If these server options, such as QUOTED_IDENTIFIER, have been set to values other than their defaults, the state on active connections is not reset when the objects are returned to the pool. Therefore, it is necessary for the consumer to reset these options as desired, or to disable the OLE DB Service Components to allow the DBMS to control these server options.

Connection Pooling is Required for New Connections in a Distributed Transaction

A new connection cannot be created inside a distributed transaction unless ODBC connection pooling is being used. ODBC will enlist the connection in the transaction.

Connection Attributes Not Reset When Destroyed or Returned to a Pool

The OLE DB Provider for ODBC does not reset all connection attributes when connections are destroyed or returned to a pool. Developers may want to verify or reset connection attributes after a connection is received from a pool. Consult the ODBC Programmer's Reference documentation about SQLSetConnectAttr for a listing of connection attributes. Microsoft SQL Server users should also consult the SQL Server Books Online for a listing of connection attributes specific to SQL Server.

Batch Updates and Multiple Results Return Only One Result Set

When issuing two update statements in a batch and requesting multiple results against the OLE DB Provider for ODBC, only one result set is returned. The error occurs when the batch statement is executed using SQLPrepare and SQLExecute. If the batch update is performed using SQLExecDirect, two sets of results are properly returned. Note that the OLE DB Provider for ODBC uses the Prepare/Execute calls and will only return one result set. The workaround is to use the OLE DB Provider for SQL Server, which uses SQLExecDirect and performs properly.

Batch Updates Lose Conflict Information for More Than One Conflicting Row

When performing a batch update through the OLE DB Provider for ODBC to SQL Server, conflict information is lost if there is more than one conflicting row. The first conflicting row in the batch will be marked conflicting and will maintain its edit status. However, any subsequent conflicting rows will not be marked conflicting and will be set back to an edit mode of adEditNone without their changes affected on the server. The workaround is to use the OLE DB Provider for SQL Server (SQLOLEDB).

Return to MDAC Table of Contents

# OLE DB Provider for Oracle

The following provides late-breaking or other information that supplements the Microsoft OLE DB Provider for Oracle documentation.

OLE DB Provider for Oracle Technical Issues

OLE DB Provider for Oracle Known Bugs and Limitations

## Technical Issues

To enable the OLE DB Provider for Oracle to work with Oracle client software, the client's registry must be modified according to the table below.

Oracle Client | Windows NT or Windows 95/98 | Windows 2000
7.x | [HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\Transaction Server\Local Computer\My Computer] "OracleXaLib"="xa73.dll" "OracleSqlLib"="SQLLib18.dll" "OracleOciLib"="ociw32.dll" | [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI] "OracleXaLib"="xa73.dll" "OracleSqlLib"="SQLLib18.dll" "OracleOciLib"="ociw32.dll"
8.0 | [HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\Transaction Server\Local Computer\My Computer] "OracleXaLib"="xa80.dll" "OracleSqlLib"="sqllib80.dll" "OracleOciLib"="oci.dll" | [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI] "OracleXaLib"="xa80.dll" "OracleSqlLib"="sqllib80.dll" "OracleOciLib"="oci.dll"
8.1 | [HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\Transaction Server\Local Computer\My Computer] "OracleXaLib"="oraclient8.dll" "OracleSqlLib"="orasql8.dll" "OracleOciLib"="oci.dll" | [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI] "OracleXaLib"="oraclient8.dll" "OracleSqlLib"="orasql8.dll" "OracleOciLib"="oci.dll"

For Windows 2000 systems

1. Run RegEdit.
2. Under the RegKey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI, edit OracleOciLib and set it to the correct values in the previous table.

Note If this key has not been added automatically by setup, add "OracleOciLib" to the registry.

For Windows NT 4.0 or Windows 95/98 systems

1. Run RegEdit.
2. Under the RegKey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Transaction Server\Local Computer\My Computer, edit OracleOciLib and set it to the correct values in the previous table.

Note This key must be added manually using RegEdit. Contact Product Support Services for instructions to install the latest Hotfix containing the registry value "OracleOciLib."

## Known Bugs and Limitations

Incompatibility with COM+

Due to changes to the XA_CLOSE implementation in Oracle 8i client software, the Microsoft OLE DB Provider for Oracle and Microsoft ODBC Driver for Oracle contained in MDAC 2.5 do not work inside of COM+. This is a known problem and will be fixed in Oracle patch 8.1.5.02. Prior to the release of the Oracle patch, the only work around is to host components outside of COM+.

dwFlags on IAccessor::CreateAccessor

This provider ignores dwFlags when calling IAccessor::CreateAccessor and will not validate or honor settings for DBBINDFLAGS_HTML or any other flag in this field. The consumer should still set dwFlags to 0.

Errors When Using Oracle 7.x Servers

Using the OLE DB Provider for Oracle against an Oracle 7.x server may produce an error when performing an outer join. In an outer join, all columns are potentially nullable; however, Oracle 7.x may report that a column in an outer join is non-nullable and therefore generate an error when a resulting column contains a null value. The workaround is to use Oracle 8.x servers.

Transactions Required for Select Statements Against Oracle 8.x Databases

When accessing an Oracle 8.x database using a "select...for update" statement, you must first start a transaction or you will receive a "Fetch out of sequence (ORA-01002)" error.

Oracle Server Converts Empty Strings to Null Values

When updating an Oracle database using either the ODBC Driver for Oracle or the OLE DB Provider for Oracle, be aware that Oracle will convert empty strings to NULL. When using ADO's Update method, you may receive the error "The specified row could not be located for updating; Some values may have been changed since it was last read." (80040e38). This occurs because the Oracle server converts the empty string to NULL, but the ADO Recordset stores the empty string.

Return to MDAC Table of Contents

# OLE DB Provider for SQL Server

The following provides late-breaking or other information that supplements the Microsoft OLE DB Provider for SQL Server documentation.

OLE DB Provider for SQL Server Technical Issues

OLE DB Provider for SQL Server Known Bugs and Limitations

## Technical Issues

There are no known technical issues at this time.

## Known Bugs and Limitations

Server Options are Reset when Service Components are Enabled

The resource pooling implementation of the OLE DB Service Components does not reset server options when returning a data source and session to the pool. For example, if the command SET QUOTED_IDENTIFIER OFF is sent to SQL Server on a session, and that session is returned to the pool, the server option is not reset. Thus the consumer may select an active connection from the pool that has certain server options set differently than intended. If these server options, such as QUOTED_IDENTIFIER, have been set to values other than their defaults, the state on active connections is not reset when the objects are returned to the pool. Therefore, it is necessary for the consumer to reset these options as desired, or to disable the OLE DB Service Components to allow the DBMS to control these server options.

Return to MDAC Table of Contents

# OLE DB Provider for Microsoft Jet

The following provides late-breaking or other information that supplements the OLE DB Provider for Microsoft Jet documentation.

OLE DB Provider for Microsoft Jet Technical Issues

OLE DB Provider for Microsoft Jet Known Bugs and Limitations

## Technical Issues

The Microsoft® Jet 4.0 database engine includes enabling all interfaces for Unicode. Data is now provided in Unicode (internationally enabled) format rather than ANSI.

## Known Bugs and Limitations

Installing Jet 4.0 Provider Prohibits Use of Jet 3.51 Provider

Installing the OLE DB Provider for Microsoft Jet 4.0 will replace several files, prohibiting the use of the OLE DB Provider for Microsoft Jet 3.51. You might have some performance issues accessing older .mdb files unless you use Access 2000 to convert them to the new Microsoft Jet 4.0 format.

Return to MDAC Table of Contents

# Data Shaping Service for OLE DB

The following provides late-breaking or other information that supplements the Microsoft Data Shaping Service for OLE DB documentation.

Data Shaping Service for OLE DB Technical Issues

Data Shaping Service for OLE DB Known Bugs and Limitations

## Technical Issues

There are no technical issues at this time.

## Known Bugs and Limitations

Not in Documentation: Data Types Supported by the Data Shaping Service

Following is a list of OLE DB data types that the Data Shaping Service for OLE DB can use in the New clause. For ADO equivalents, see the ADO DataTypeEnum documentation.

DBTYPE_BOOL | DBTYPE_I2
DBTYPE_BSTR | DBTYPE_I4
DBTYPE_BYTES | DBTYPE_I8
DBTYPE_CY | DBTYPE_NUMERIC
DBTYPE_DATE | DBTYPE_R4
DBTYPE_DBDATE | DBTYPE_R8
DBTYPE_DBTIME | DBTYPE_STR
DBTYPE_DBTIMESTAMP | DBTYPE_UI1
DBTYPE_DECIMAL | DBTYPE_UI2
DBTYPE_ERROR | DBTYPE_UI4
DBTYPE_FILETIME | DBTYPE_UI8
DBTYPE_GUID | DBTYPE_VARNUMERIC
DBTYPE_I1 | DBTYPE_WSTR

Return to MDAC Table of Contents

# Open Database Connectivity (ODBC)

The following provides late-breaking or other information that supplements the Microsoft ODBC documentation.

ODBC Technical Issues

ODBC Known Bugs and Limitations

## Technical Issues

32-bit ODBC Clients and Drivers Recommended

Unless the driver exposes CONFIGDSN, the ANSI equivalent of CONFIGDSNW, 16-bit ODBC clients cannot add, configure, or remove UNICODE ODBC drivers. The workaround is to use 32-bit APIs that support UNICODE. Microsoft, MERANT, Simba Technologies, and others make 32-bit drivers available for all major databases.

Microsoft Transaction Server Transactions

For information about participating or enlisting in a Microsoft Transaction Server transaction, consult the Microsoft Transaction Server documentation. Detailed information is provided for driver developers and application writers.

Automatic Transaction Enlistment Requires Connection Pooling

ODBC cannot have automatic transaction enlistment without having connection pooling enabled.

## Known Bugs and Limitations

Locked-down Systems Prevent Creation of ODBC DSNs

In a locked-down system, such as Zero Administration Windows, Windows 2000, or Windows Terminal Server, the user does not have privileges to write to the HKLM registry tree. Because of this, applications that create ODBC DSNs, including DSN-less connections using the ODBC Driver for Microsoft Jet, will fail. The workaround is to create the DSNs using the Windows Administrator account.

Return to MDAC Table of Contents

# ODBC Driver for Oracle

The following provides late-breaking or other information that supplements the Microsoft ODBC Driver for Oracle documentation.

ODBC Driver for Oracle Technical Issues

ODBC Driver for Oracle Known Bugs and Limitations

## Technical Issues

To enable the ODBC Driver for Oracle to work with Oracle client software, the client's registry must be modified according to the table below.

Oracle Client | Windows NT or Windows 95/98 | Windows 2000
7.x | [HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\Transaction Server\Local Computer\My Computer] "OracleXaLib"="xa73.dll" "OracleSqlLib"="SQLLib18.dll" "OracleOciLib"="ociw32.dll" | [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI] "OracleXaLib"="xa73.dll" "OracleSqlLib"="SQLLib18.dll" "OracleOciLib"="ociw32.dll"
8.0 | [HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\Transaction Server\Local Computer\My Computer] "OracleXaLib"="xa80.dll" "OracleSqlLib"="sqllib80.dll" "OracleOciLib"="oci.dll" | [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI] "OracleXaLib"="xa80.dll" "OracleSqlLib"="sqllib80.dll" "OracleOciLib"="oci.dll"
8.1 | [HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\Transaction Server\Local Computer\My Computer] "OracleXaLib"="oraclient8.dll" "OracleSqlLib"="orasql8.dll" "OracleOciLib"="oci.dll" | [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI] "OracleXaLib"="oraclient8.dll" "OracleSqlLib"="orasql8.dll" "OracleOciLib"="oci.dll"

For Windows 2000 systems

1. Run RegEdit.
2. Under the RegKey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI, edit OracleOciLib and set it to Oci.dll. (The default is Ociw32.dll.)

Note This key is added automatically by setup.

For NT 4 or Windows 95/98 systems

1. Run RegEdit.
2. Under the RegKey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Transaction Server\Local Computer\My Computer, edit OracleOciLib and set it to Oci.dll. (The default is Ociw32.dll.)

Note This key is must be added manually using RegEdit. Contact Product Support Services for instructions to install the latest HOTFIX containing the registry value "OracleOciLib."

## Known Bugs, Limitations, and Workarounds

Incompatibility with COM+

Due to changes to the XA_CLOSE implementation in Oracle 8i client software, the Microsoft OLE DB Provider for Oracle and Microsoft ODBC Driver for Oracle contained in MDAC 2.5 do not work inside of COM+. This is a known problem and will be fixed in Oracle patch 8.1.5.02. Prior to the release of the Oracle patch, the only work around is to host components outside of COM+.

Driver Returns Error Messages or Data Truncation Messages

The driver may return error messages or data truncation messages when the Setup Wizard is not forced to guess the column definition. The default for the version 2.5 driver is "0".

Access Violation When Updating a Static Table

The ODBC Driver for Oracle may encounter an access violation when deleting a row from a resultset clause. This is due to a bug that allows updates to a static table.

No Support for ODBC 3.0 and Later Datatypes

The ODBC Driver for Oracle returns "[Microsoft][ODBC driver for Oracle]SQL data type out of range" when queried for ODBC 3.0 and later datatypes through SQLGetTypeInfo. The ODBC Driver for Oracle supports ODBC 2.5 types only.

Client Cursor Engine Cannot Update Databases via OLE DB Provider for ODBC with ODBC Driver for Oracle

When using the OLE DB Provider for ODBC (MSDASQL) with the ODBC Driver for Oracle, there is not enough information provided in the Columns MetaData rowset returned by the IColumnsRowset interface for the Client Cursor Engine to perform updates (UpdateBatch method in ADO). The workaround is to use the OLE DB Provider for Oracle (MSDAORA) instead.

Return to MDAC Table of Contents

# ODBC Data Source Administrator

The following provides late-breaking or other information that supplements the Microsoft ODBC Data Source Administrator documentation.

ODBC Data Source Administrator Technical Issues

ODBC Data Source Administrator Known Bugs and Limitations

## Technical Issues

There are no technical issues at this time.

## Known Bugs and Limitations

Start Visual Studio Analyzer Button

Clicking the Start Visual Studio Analyzer button on the Tracing tab of the ODBC Data Source Administrator will generate the following error message if Visual Studio Analyzer is not installed: "Failed to register ODBC as a Visual Studio Event Source."

Online help

Right-clicking static labels in dialog boxes accessed from the ODBC Data Source Administrator does not bring up context-sensitive help. To access help for these controls, you must click the question mark button in the top right corner of the dialog box and then click the control. Right-click help is enabled for all buttons, option buttons, and check boxes.

Return to MDAC Table of Contents

# ODBC Desktop Database Drivers

The following provides late-breaking or other information that supplements the Microsoft ODBC Desktop Database Drivers documentation.

ODBC Desktop Database Drivers Technical Issues

ODBC Desktop Database Drivers Known Bugs and Limitations

## Technical Issues

CREATE_DB Refers to Jet 4.0 Databases

The ODBC Driver for Jet now interprets CREATE_DB to mean Jet 4.0 databases instead of Jet 3.x databases. Applications that previously created Jet 3.x databases, including Microsoft Project 98, will now create Jet 4.0 databases using this keyword. Jet 4.0 databases can be read using MDAC 2.1 or later, and Microsoft Access 2000 or later. The CREATE_DBV4 keyword has been added to allow applications to specify creation of Jet 4.0 databases.

Parameters

Due to a change in the Jet 4.0 engine, parameters that are contained in sub-queries are inserted before parameters at the top level of the statement. The ODBC specification states that parameters are bound in the order that they appear in the SQL statement into which they are to be inserted. Then when the statement is executed, they are inserted in that order. This was the case in Jet 3.51, but with the Jet 4.0 the behavior has changed.

## Known Bugs and Limitations

There are no known bugs or limitations at this time.

Return to MDAC Table of Contents

# SQL Server Client Data Access Components

Introduction

Common Issues: Installing Instcat.sql on the Server

OLE DB Provider for SQL Server

SQL Server ODBC Driver

- Overview
- Documentation Sources Regarding Using ODBC with SQL Server
- Using the Driver in a Development Environment
- Compatibility Issues

Client Net-Library

Client Network Utility

## Introduction

MDAC includes Microsoft SQL Server client connectivity components that allow ADO, OLE DB, and ODBC clients to access SQL Server data.

These are the SQL Server components included in MDAC:

- OLE DB Provider for SQL Server
- SQL Server ODBC driver
- Subset of the SQL Server Client Net-Libraries
- Client Network Utility to manage the network libraries.

The following sections of this Readme file describe how to use specific SQL Server components in this version of MDAC against various versions of SQL Server.

## Common Issues

Issues common to both the OLE DB Provider for SQL Server and SQL Server ODBC driver are discussed in this section.

### Installing Instcat.sql on the Server

The OLE DB Provider for SQL Server and the SQL Server ODBC driver use a set of system-stored procedures, known as catalog-stored procedures, to obtain information from the SQL Server system catalog. Each version of the OLE DB provider for SQL Server and the ODBC driver is developed to work with a specific version of the catalog stored procedures.

The Instcat.sql file included with the OLE DB Provider for SQL Server version 07.01.0690 and the SQL Server ODBC driver version 3.70.0690 includes minor updates to the catalog-stored procedures which upgrade the procedures to the versions used by the OLE DB Provider for SQL Server version 07.01.0690 and the SQL Server ODBC driver version 3.70.0690. The Instcat.sql file shipped with the OLE DB provider for SQL Server version 07.01.0690 and the SQL Server ODBC driver version 3.70.0690 is the same as the Instcat.sql file shipped with SQL Server 7.0. SQL Server 7.0 sites need not run the Instcat.sql.

The SQL Server system administrator must use the Instcat.sql script to upgrade the catalog-stored procedures to ensure the proper operation of the driver. Upgrading the catalog-stored procedures does not affect the operation of older SQL Server clients. This must be done for all versions of SQL Server from version 4.21a to 6.5. This upgrade is not needed if you have SQL Server 7.0.

To upgrade the catalog stored procedures on SQL Server 4.21a, 6.0, or 6.5, the system administrator must run the Instcat.sql script using the isql utility (see the following instructions).

Before making any changes to the master database, the system administrator should back it up. To run isql, your computer must be installed as a client workstation for SQL Server.

At the command prompt, use the isql utility to run the Instcat.sqlscript. For example:

`C:>ISQL /Usa /Psa_password /Sserver_name`

`/ilocation\Instcat.Sql`

where

sa_password

Is the system administrator's password.

server_name

Is the name of the server on which SQL Server resides.

location

Is the full path of the location of Instcat.Sql.

The Instcat.sql script generates many messages. Most of these indicate how many rows were affected by the Transact-SQL statements issued by the script. Most of these messages can be ignored, although the output should be scanned for messages that indicate an execution error. When Instcat.sql is run on SQL Server version 6.0, the message "the object sp_MS_upd_sysobj_category does not exist" can be ignored. The last message should indicate that Instcat.sql completed successfully. The Instcat.sql script fails when there is not enough space available in the master database to store the catalog-stored procedures or to log the changes to existing procedures.

Return to SQL Server Client Data Access Components

## OLE DB Provider for SQL Server

The OLE DB Provider for SQL Server version 07.01.0690 can be used to access SQL Server versions 7.0 and 6.5.

Because the OLE DB Provider for SQL Server version 07.01.0690 is shipped with SQL Server 7.0, users of SQL Server 7.0 should refer to SQL Server 7.0 documentation for this driver instead of the documentation in this Readme file. SQL Server Books Online for SQL Server 7.0 is available on MSDN and also on Technet CDs.

Users of SQL Server version 6.5 can look at MDAC SDK documentation for OLE DB Provider for SQL Server 7.0.

Return to SQL Server Client Data Access Components

## SQL Server ODBC Driver

This topic describes using the SQL Server ODBC driver version 3.70.0690 with SQL Server 6.5 or earlier.

Because the SQL Server ODBC driver version 3.70.0690 is shipped with SQL Server 7.0, users of SQL Server 7.0 should refer to SQL Server 7.0 documentation for this driver instead of the documentation in this Readme file. SQL Server Books Online for SQL Server 7.0 is available on MSDN and also on Technet CDs.

### Overview

The SQL Server ODBC driver version 3.70.0690 is a Win32 ODBC version 3.51 driver. It can be used with applications written to either the ODBC 2.X or ODBC 3.X APIs. The driver works with SQL Server version 4.21a or later. The driver runs on Windows 95, Windows 98, Windows NT version 4.0.

A Win32 SQL Server 7.0 client Network Utility (cliconfg.exe) is also installed with the SQL Server ODBC driver version 3.70.0690. This SQL Server Client Network Utility can be used with SQL Server version 4.21a or later.

### Documentation Sources Regarding Using ODBC with SQL Server

The SQL Server ODBC driver version 3.70.0690 is the same driver that is shipped with SQL Server 7.0. Users of SQL Server 7.0 can refer to SQL Server 7.0 documentation for the SQL Server ODBC driver version 3.70.0690. SQL Server Books Online for SQL Server 7.0 is available on MSDN and also on Technet CDs.

When SQL Server ODBC driver version 3.70.0690 is used with SQL Server (version 4.21a, 6.0, or 6.5), the driver operates in the same manner as the older drivers. You can use the driver-specific information supplied with that version of SQL Server. This includes:

- The Drvssrvr.hlp file that shipped with the earlier version of SQL Server.
- The section "Programming ODBC for Microsoft SQL Server" in the SQL Server 6.5 manuals.
- The white paper "Using ODBC with Microsoft SQL Server" available on MSDN.

The Sqlsodbc.hlp file that ships with the SQL Server ODBC Driver version 3.70.0690 contains only context-sensitive help for the SQL Server DSN Configuration wizard. The Drvssrvr.hlp file that shipped with earlier versions of the SQL Server ODBC driver contained driver-specific information for older versions of the driver. The information contained in the older versions of Drvssrvr.hlp is duplicated in the SQL Server 6.5 manual "Programming ODBC for Microsoft SQL Server."

### Using the Driver in a Development Environment

The SQL Server ODBC driver uses driver-specific parameters for several ODBC function calls. #defines for these driver-specific parameters and driver-specific C and C++ programming structures are contained in the include file Odbcss.h.

The SQL Server ODBC driver version 3.70.0690 works with the Odbcss.h file provided in the following sources:

- SQL Server 7.0
- SQL Server 6.5 Service Pack 2 (SP2) or later
- MDAC SDK

The MDAC SDK is part of the Microsoft Developer Network Professional edition. The SDK can also be downloaded from the Microsoft Web site at http://www.microsoft.com/data. The SDK is also available from Microsoft Press in the "Microsoft ODBC 3.0 Software Development Kit and Programmer's Reference."

### Compatibility issues

Because ODBC driver version 3.70.0690 is shipped with SQL Server 7.0, users of SQL Server 7.0 should refer to the ODBC documentation in SQL Server 7.0. The compatibility issues documented in this section only apply when running this driver with earlier versions of SQL Server (4.21a, 6.0, and 6.5).

The SQL Server ODBC driver version 3.70.0690 displays a new wizard when adding or configuring data sources in either the ODBC Administrator utility or when an application calls SQLConfigDataSource and asks the driver to prompt the user for information. Click the Help button in the wizard to access the wizard documentation.

In the SQL Server ODBC Driver version 2.65 that shipped with SQL Server 6.5, the SQL_COPT_SS_PERF_QUERY_INTERVAL worked in seconds instead of the milliseconds it was documented to use (see Knowledge Base article Q157753). In the SQL Server ODBC driver version 3.70.0690, SQL_COPT_SS_PERF_QUERY_INTERVAL has been changed to work in milliseconds as documented.

The following changes affect only applications written using the ODBC 3.X API. They do not affect applications written using the ODBC 2.X API. These changes should not impact the result set processing in most ODBC applications.

In earlier versions of the SQL Server ODBC Driver, contiguous PRINT or RAISERROR statements in a batch or stored procedure return their messages together, in one result set. In the SQL Server ODBC Driver version 3.70.0690, the messages for each SQL statement are returned as separate result sets. You must call SQLMoreResults between each message to be positioned on the message for the next SQL statement. The messages from a single SQL statement, such as a DBCC statement, are all returned in a single result set and there is no need to call SQLMoreResults between each message.

In earlier versions of the SQL Server ODBC Driver, a run-time error or a RAISERROR with a severity of 11 or higher on the first statement in a batch or stored procedure causes either SQLExecute, SQLExecDirect, or SQLParamData to return SQL_ERROR. In the SQL Server ODBC Driver version 3.70.0690, SQLExecute, SQLExecDirect, or SQLParamData returns SQL_ERROR only if no other statements are executed after the first statement. If any other statements are executed after the first (even a simple RETURN statement with no return value) then SQLExecute or SQLExecDirect returns SQL_SUCCESS_WITH_INFO. After processing the SQL_SUCCESS_WITH_INFO messages using SQLGetDiagRec, call SQLMoreResults to be positioned on the next result set.

When earlier versions of the driver encountered an error on the first statement of a batch or stored procedure, the statement handle was available for use with another SQL statement after SQLExecute or SQLExecDirect returned SQL_ERROR. When the version 3.7 driver returns SQL_SUCCESS_WITH_INFO, the statement is not free to process another SQL statement until SQLMoreResults returns SQL_NO_DATA or until all result sets following the RAISERROR have been closed. If no result set follows the error message, then SQLCloseCursor cannot be called. SQLFreeStmt(SQL_CLOSE) or SQLMoreResults must be called to free the statement handle to process another SQL statement:

    CREATE PROCEDURE TestPrc @Parm1 as
    IF (@Parm1 IS NULL)
    BEGIN
       RAISERROR ('Parm1 cannot be NULL', 11, 1)
       RETURN
    END
    SELECT * FROM sysusers WHERE suid = @Parm1
    GO

    Execute the following:

    SQLExecDirect(hstmt, "{ call TestPrc (NULL) }", SQL_NTS);

When using an older version of the SQL Server ODBC Driver, or if the application uses the ODBC 2.X API, then SQLExecDirect returns SQL_ERROR. After SQLGetDiagRec returns SQL_NO_DATA or SQLError returns SQL_NO_DATA_FOUND, the statement handle is free to execute another SQL statement.

When using the SQL Server ODBC Driver version 3.70.0690 from an application written to the ODBC 3.X API, then SQLExecDirect returns SQL_SUCCESS_WITH_INFO. After SQLGetDiagRec returns SQL_NO_DATA, the statement handle cannot be used to process another SQL statement until SQLMoreResults returns SQL_NO_DATA or SQLFreeStmt(SQL_CLOSE) is called.

In earlier versions of the SQL Server ODBC Driver, SQLExecute, SQLExecDirect, or SQLParamData returns SQL_SUCCESS when an application executes a UPDATE or DELETE statement that affects no rows. For this case, the version 3.7 driver still returns SQL_SUCCESS to applications written with the ODBC 2.X API, but it returns SQL_NO_DATA to applications written with the ODBC 3.X API. If either the ODBC 2.X application that receives SQL_SUCCESS or the ODBC 3.X application that receives SQL_NO_DATA then calls SQLRowCount, SQLRowCount returns a count of zero.

ODBC 3.X more clearly defines the way results are returned than ODBC 2.X. Earlier versions of the SQL Server ODBC Driver returned the values of output parameters and return codes when the ODBC 2.X functions SQLFetch or SQLExtendedFetch returned SQL_NO_DATA on the last result set returned by a stored procedure. The SQL Server ODBC Driver version 3.70.0690 retains this behavior when called by ODBC 2.X applications. When the version SQL Server ODBC Driver version 3.70.0690 is called by ODBC 3.X applications, however, the driver does not return output parameters or return codes until SQLMoreResults returns SQL_NO_DATA.

Return to SQL Server Client Data Access Components

## Client Net-Library

The OLE DB Provider for SQL Server and the SQL Server ODBC Driver use the SQL Server client Net-Libraries to communicate with the server.

As part of the installation, MDAC installs all the newer Net-Libraries so that the the OLE DB Provider for SQL Server and the SQL Server ODBC Driver are in sync with the Net-Libraries.

## Client Network Utility

The version of the SQL Server Client Network Utility installed by MDAC is used by the SQL Server ODBC Driver version 3.70.0690 when creating data sources.

Return to SQL Server Client Data Access Components

Return to MDAC Table of Contents

# Visual FoxPro ODBC Driver

The following describes using the Microsoft Visual FoxPro ODBC Driver version 6.0a.

Installation Notes

- System Requirements
- What's New in this Release
- Installing the Driver
- Adding a Data Source
- Help Files
- Naming Conventions

Supported Areas

- Language Support
- ODBC 3.51 Compliance
- Referential Integrity
- Thread Support
- Supported Versions of dBASE® IV Tables
- International Support

Unsupported Areas

Known Issues

Troubleshooting

Books

## Installation Notes

System Requirements

To install the Visual FoxPro ODBC Driver, you need:

- Windows NT 4 or later, Service Pack 5 recommended; or Windows 95/Windows 98 or later.
- 2 megabytes disk space.

Important Visual FoxPro ODBC Driver is a 32-bit driver only. Windows 3.1 and Windows for Workgroups platforms are not supported.

The Windows 2000 operating system installs only the English version of the VFP ODBC Driver. Previous versions of the driver localized in German, French, and Spanish will be overwritten by the English version.

What's New in this Release

The initial setting for SET REPROCESS is changed to 5 so that Visual FoxPro tries to lock a record for a limited number of times. If the attempted lock fails, Visual FoxPro generates an error.

The Visual FoxPro settings for DELETED and NULL can now be set in the Driver Configuration Dialog or via the Connection String. The syntax is:

- Null=Yes/No;
- Deleted=No/Yes;

Installing the Driver

To install the Visual FoxPro ODBC Driver, run SETUP.EXE.

Note The Visual FoxPro ODBC Driver installation updates the ODBC components to ODBC 3.51 compliance if necessary. See the ODREADME.TXT file in your MSDASDK directory for additional information on enhancements or features of ODBC 3.51.

Adding a Data Source

After installing, define a data source:

1. In Windows Control Panel, double-click the Administrative Tools icon.
2. Double-click the Data Sources (ODBC) icon.
3. Click Add.
4. Select Microsoft Visual FoxPro Driver.
5. In the ODBC Visual FoxPro Setup dialog box, enter a data source name.
6. Select either Visual FoxPro database (.DBC) or Free Table directory.
7. Enter the name of the database or the path to the free table, or click Browse.
8. Click OK, and then click Close.

Help Files

The Visual FoxPro ODBC Driver comes with two help files, located in the SYSTEM directory on Windows 95/Windows 98 or the SYSTEM32 directory on Windows NT/Windows 2000:

- ODBCINST.CHM - General ODBC information which contains information on:
  - The ODBC Driver dialog box
  - The options that can be set in the drivers dialog box in the Control Panel
- DRVVFP.CHM - Visual FoxPro ODBC Driver Setup Dialog Box Help file

You can find more information about the Visual FoxPro ODBC Driver in the Microsoft Data Access Components (MDAC) SDK, which is available at msdn.microsoft.com. (Open the MSDN Library Online and then the Platform SDK to find the MDAC SDK, which contains a section called ODBC Drivers.) The Visual FoxPro ODBC Driver section of the MDAC SDK contains information on:

- Installing and Configuring
- Using the Visual FoxPro Driver
- Technical Reference
- ODBC API
- Visual FoxPro Language Reference
- Error Messages

Naming Conventions

The Visual FoxPro ODBC Driver names columns based on expressions. For example, if you execute the following statement:

SELECT MIN (customer_id) FROM customers

the Visual FoxPro ODBC Driver returns min_customerid as the name of the column in the result set. If you would like to control the resulting field name, use the AS clause, as in this example:

SELECT MIN(customer_id) AS minimum_custid FROM customers

Return to Visual FoxPro ODBC Driver

## Supported Areas

The following section describes areas of particular support by the Visual FoxPro ODBC Driver.

Language Support

Supported Versions of FoxBase+® and FoxPro Tables The Visual FoxPro ODBC Driver gives you access to Microsoft® FoxBase+®, FoxPro 1.x, FoxPro 2.x and Visual FoxPro tables. Also, the Visual FoxPro ODBC Driver allows you to access tables that are in a Visual FoxPro database container (.DBC file).

Note The Visual FoxPro ODBC Driver only allows transactions on tables within a Visual FoxPro database (.DBC file), not free tables.

ODBC 3.51 Compliance

The Visual FoxPro ODBC Driver is ODBC Level 1 API compliant and also implements several Level 2 APIs. All supported APIs have been implemented at this time. Please report any problems you find regarding the APIs. The MDAC SDK help file documents supported functions and acceptable input parameters. In addition, Visual FoxPro SQL extends the SQL functionality available through the driver. See the Visual FoxPro Language Reference for the extended grammar.

Referential Integrity Support

The Visual FoxPro ODBC Driver supports Visual FoxPro rules, triggers, and default values, provided they contain functions that are supported by the driver. See the MDAC SDK help file for details on which Visual FoxPro language elements are supported.

Thread Support

The Visual FoxPro ODBC Driver can process queries in the background. However, you should avoid using connection pooling with the VFP ODBC Driver. Disable this feature if the driver is being called by a multi-threaded application. To do so, set BackGroundFetch=No in the connection string or clear the "Fetch data in background" check box in the Setup dialog box. For more information, see the "ODBC Visual FoxPro Setup Dialog Box" Help topic in DRVVFP.CHM or in the MDAC SDK help file.

Remote Views and Parameterized Views

Any time SQLTables( ) is called, remote and parameterized views are excluded from the list. Local views based on parameterized views are not excluded, but will generate errors if you use them. If you call SQLTables( ) with a unique table name, however, you will find views (if they are present) so you can check for name conflicts.

Supported Versions of dBASE® IV Tables

The Visual FoxPro ODBC Driver gives you access to dBASE 4 and earlier tables. The dBASE files are supported in the following manner:

- dBASE(r) v2.x and 3.x: The files are read without conversion.
- dBASE(r) v4.x and 5.x: If the files do not have memo fields and the table has fewer than 255 columns, the files are read.

Caution If a dBASE ® v4.x or 5.x file has associated index files (.MDX, .NDX), the Visual FoxPro ODBC Driver will not update the file properly and the indexes will be corrupted. These files should be accessed read-only.

- dBASE v4.x and 5.x tables with memo fields: These files require conversion in the full Visual FoxPro for Windows product before using them with the Visual FoxPro ODBC Driver. The driver will not read or convert files.

International Support

The driver is DBCS enabled.

You can now set the collating sequence for index ordering. The list of supported collating sequences can be found in the description of SET COLLATE in the Visual FoxPro Language Reference section of the MDAC SDK.

The default collating sequence is "MACHINE". The collating sequence can be changed by executing either a SET COLLATE TO Language with the ODBC C API SQLExecDirect( ), by calling SQLPrepare( ) and SQLExec( ) (see the ODBC SDK Reference manual p. 42-44), or by selecting a different collating sequence from the driver options in the Data Source Setup dialog.

Note The FOXPRO.INT file is installed in the system directory. If it is removed, the collating sequences on Eastern European code page machines will not work.

Return to Visual FoxPro ODBC Driver

## Unsupported Areas

Refresh is not supported in rules and triggers.

The Visual FoxPro ODBC Driver section of the MDAC SDK help file describes the supported commands and functions and includes an updated list of the unsupported commands and functions. Any command or function not listed in the Help file is not supported.

Parameterized views work in a trigger only if the parameter has been assigned a value before the view is opened. Interactive input of a parameter value is not allowed in ODBC.

The Visual FoxPro ODBC Driver does not support remote views to other ODBC data sources; however, local views (non-parameterized) are fully supported.

## Known Issues

If you insert, delete, or update a Visual FoxPro table via the Visual FoxPro ODBC Driver, you might get a "Trigger Failed" message. Check for unsupported commands in the trigger.

INDEX ON is not supported in this release.

If a table is opened exclusively and the same table is accessed by another user with SET EXCLUSIVE OFF, then the error "Option Value Changed" is returned by Visual FoxPro ODBC Driver instead of "File is in use by another."

MSQuery returns a "Cannot Open File" error when creating a table with a field name that starts with a number. For example, the field name "1995 Sales" is not allowed. Visual FoxPro does not allow the creation of field names that begin with a number, but MSQuery does.

Issues with Empty Date Value

In the VFP ODBC Driver, the strict default for Empty Date Value is 0 (off). The driver will handle any invalid date by converting the value to the empty date value " / / ". ODBC clients might interpret the VFP ODBC Driver empty date value in different ways. You should verify the way your application handles this value, so you can interpret and use this data effectively.

Differences Between the Previous FoxPro ISAM Driver and the Visual FoxPro ODBC Driver

The VFP ODBC Driver does not support column names longer than 10 characters or column names containing spaces, unless the table is contained in a database container (.dbc).

You cannot independently select indexes to be used with a given table.

The VFP ODBC Driver places newly created tables in the default directory of the application using the driver, not in the location pointed to by the data source. To ensure that tables are placed in a specific directory, indicate this in the SQL code. For example: "CREATE TABLE C:\MyFolder\myTable (col1 i, col2 c(10))".

Return to Visual FoxPro ODBC Driver

## Troubleshooting

If you have trouble installing the driver, try the following and then try to reinstall again:

1. Clean-boot the machine. For example, under Windows 95, start in Safe Mode.
2. Close all other applications, including virus software, third-party shells, or toolbars such as Microsoft Office Manager.
3. If the computer has video or system ROM shadowing, disable these options before reinstalling.
4. Check that the .EXE file is not corrupted.

If you are still having problems:

- Make sure that you are running on a clean configuration when testing issues.

Use the Tracing tab of the Microsoft ODBC Data Source Administrator to help determine the cause of problems. To open the ODBC Data Source Administrator in Windows 2000, open the Windows Control Panel, double-click the Administrative Tools icon, and then double-click the Data Sources (ODBC) icon. (In previous versions of Windows, open the Control Panel and double-click 32-bit ODBC or ODBC to open the ODBC Data Source Administrator dialog box.)

- Check to see if the latest build of the driver is installed. To view the version:
  1. In the Windows Control Panel, double-click the Administrative Tools icon, and then double-click the Data Sources (ODBC) icon.
  2. Click on the Drivers tab.
- You can generate an ODBC Trace Log by using the ODBC Data Source Administrator:
  1. In the Windows Control Panel, double-click the Administrative Tools icon, and then double-click the Data Sources (ODBC) icon.
  2. Click on the Tracing tab.
  3. Specify a When to trace option.
  4. Specify a log file name.
  5. Click Start Tracing Now.

Now, when you execute your code, all the C ODBC API calls, their input parameters, and their output are written to the log file. The ODBC log file is ASCII text that you can view in any standard ASCII text editor such as Word, Notepad, or WordPad. Occasionally, it might be necessary to include the trace log in a bug report. Since the ODBC trace log can be lengthy, copy only the last four or five function calls and paste them into a separate document before sending the bug report.

## Books

- Microsoft ODBC 3.0 Programmer's Reference and SDK Guide (ISBN#: 1-57231-516-4 from Microsoft Press) provides basic reference information.
- Inside ODBC (ISBN#: 1-55615-815-7 from Microsoft Press) provides a good background on the development of the ODBC specifications and a CD with ODBC code examples.
- Database Developer's Guide with Visual C++ (ISBN#: 0-672-30613-1 from SAMS Publishing) has several good C++ examples that use the ODBC API.

Return to Visual FoxPro ODBC Driver

Return to MDAC Table of Contents

## Copyright

Information in this document, including URL and other Internet web site references, is subject to change without notice and is provided for informational purposes only. The entire risk of the use or results of the use of this document remains with the user, and Microsoft Corporation makes no warranties, either express or implied. The example companies, organizations, products, people and events depicted herein are fictitious. No association with any real company, organization, product, person or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

© 1991-1999 Microsoft Corporation. All rights reserved.

Microsoft, MS-DOS, Windows, Windows NT, ActiveX, Visual Studio, Visual C++, Visual FoxPro, and MSDN are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

Return to MDAC Table of Contents