Copyright: , 1995 INTERSOLV


	DataDirect ODBC  Btrieve Driver
Btrieve ODBC Setup

Defining Table Structure

Copyright


Copyright
Copyright 1995 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.


Btrieve ODBC Setup
Configuring a Btrieve Data Source

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

Description:  An optional long description of a data source name.  For example, "My Accounting Database" or "Btrieve files in C:\ACCOUNTS."

Database Directory:  The full pathname of the directory that contains the Btrieve files and the data dictionary files (.DDF).  Data dictionary files describe the structure of Btrieve data.  If no directory is specified, the current working directory is used.

The following settings are optional:

Default Logon ID:  The default logon ID used to connect to your Btrieve database.  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 a connection string.

File Open Cache:  A numeric value to specify the maximum number of unused file opens to cache.  For example, the value 4 specifies that when a user opens and closes four tables, the tables are not actually closed.  The driver keeps them open so that if another query uses one of these tables, the driver does not have to perform another open, which is expensive.  The advantage of file open caching is increased performance.  The disadvantage is that a user who specifies file locking on open may get a locking conflict even though no one appears to have the file open.  The default is 0, which means no file open caching.

Array Size:  A value that enables the driver to retrieve an array of records from the Btrieve engine and in most cases results in better performance for the application. The Array Size value is the number of bytes in the array. The default value is 4096 bytes and the maximum is 65535 bytes.

Action for Undefined Tables:  A setting to indicate whether the driver should prompt the user when it encounters a table for which it has no structure information.  Set the Prompt for Definition radio button to prompt the user; set the Return Error Condition radio button (the default) to return an error.

Version:  The version of Btrieve you want to access.  Choose either the Btrieve 5.x radio button (the default) or the Btrieve 6.x  radio button.

International Sort:  A setting to indicate the order in which records are retrieved when you issue a Select statement with an Order By clause.  Select this check box to use the international sort order as defined by your operating system.  International sort order is case-insensitive (a precedes B); the sorting of accented characters is also affected (see your operating system documentation).  Leave this box blank to use ASCII sort order.  ASCII sort order is case-sensitive, where uppercase letters precede lowercase letters (B precedes a).

Define:  Displays the Define File dialog box to let you select a definition file, and then displays the Define Table dialog box.

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.


Btrieve Define File
Defining Table Structure

Since Btrieve does not store any column information in the data file, you must define its structure through the Btrieve setup dialog box, which you can access through the ODBC Administrator.

To define the structure of a file, take the following steps:

1	Click Define in the setup dialog box.  The Define File dialog box appears.

2	Select the file you want to define and click OK.  The Define Table dialog box appears.

In this dialog box, Database Name and File display the name of the directory containing the NetWare SQL data dictionary files and the name of the file, respectively.

3	In the Table Information section of this dialog box, type the name of the table to be returned by SQLTables.  The name can be up to 20 characters and may not be the same as another defined table in the database.  This field is required.

4	The Column Information section of this dialog box lets you add, modify, and delete columns.  The box at the top of this section displays the defined columns.  To add a column definition, do the following:

a	In the Name box, type the name of the column.

b	In the Type box, open the drop-down list and select the column's data type.

c	In the Length box, type the column's length, if applicable.

d	In the Scale box, type the column's scale, if applicable.

e	Click Add.

To modify a column's definition, select the column you want to modify, type the new definition in the appropriate boxes (refer to steps 4a-d), and click Modify.

To remove a column's definition, select the column you want to remove and click Remove.

5	Click OK to define the table.