Copyright: , 1995 INTERSOLV


	DataDirect ODBC  dBASE Driver
dBASE ODBC Setup

dBASE Index Attributes

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.


dBASE ODBC Setup
Configuring a dBASE Data Source

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

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

Database Directory:  A path specification to the directory that contains the database files.  If none is specified, the current working directory is used.

The following values are optional:

Create Type:  The type of table or index to be created on a Create Table or Create Index statement.  Select dBASE II, dBASE III, dBASE IV, dBASE V, Clipper, FoxBASE, FoxPro1, or FoxPro25.  The default is dBASE V.

Locking:  The level of locking for the database file (FILE, RECORD, or NONE).  FILE locks all of the records in the table.  RECORD (the default) locks only the records affected by the statement.  NONE offers the best performance but is intended only for single-user environments.

Lock Compatibility:  The locking scheme the driver uses when locking records.  Select dBASE, Q+E, Q+EVirtual, Clipper, or Fox.  The default is dBASE.  These values determine locking support as follows:

•	dBASE specifies Borland-compatible locking.

•	Q+E specifies that locks be placed on the actual bytes occupied by the record.  Only applications that use the dBASE driver can read and write to the database.  Other applications are locked out of the table completely (they cannot even read other records).  This locking is compatible with earlier versions of Q+E products.

•	Q+EVirtual specifies that locks be placed on bytes beyond the physical end-of-file.  Q+EVirtual is the same as Q+E except that other applications can open the table and read the data.

The advantage of using a Q+E locking scheme over dBASE locking is that, on Inserts and Updates, Q+E locks only individual index tags, while dBASE locks the entire index.

•	Clipper specifies Clipper-compatible locking.

•	Fox specifies FoxPro- and FoxBASE-compatible locking.

If you are accessing a table with an application that uses the dBASE driver, your locking scheme does not have to match the Create Type.  However, if you are accessing a table with two applications, and only one uses the dBASE driver, set your locking scheme to match the other application.  For example, you do not have to set this value to Fox to work with a FoxPro table.  But if you are using a FoxPro application simultaneously with an application using the dBASE driver on the same set of tables, set this value to Fox to ensure that your data does not get corrupted.

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.

Cache Size:  The amount of memory, in 64K blocks, that the driver uses to cache database records.  The higher the number, the better the performance.  The maximum number you can set depends on the system memory available.  This value must be a multiple of 64.  The default is 256K.  If the cache size is greater than 0, when browsing backwards, you will not be able to see updates made by other users until you reexecute the Select statement.

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 the ASCII sort order.  ASCII sort order is case-sensitive, where uppercase letters precede lowercase letters (B precedes a).

Use Long Names: Set this check box to use long filenames as table names. The maximum table name length is specific to the enviroment in which you are running (for example, in Windows 95, the maximum table name length is 128.

Use Long Qualifiers: Set this check box to use long pathnames as table qualifiers. When you set this check box, pathnames can be up to 255 characters. The default length for pathnames is 128 characters.

Define:  Displays the Define File dialog box to let you select an index file, and then displays the Define File 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.


Defining Index Attributes

To define the index files that are associated with a dBASE file:

1	Click Define in the dBASE setup dialog box, which you can access through the ODBC Administrator.  The standard file open dialog box for your system appears.

2	Select a dBASE file and click OK to define the special indexes using the Define Table dialog box.

The upper section of the dialog box displays the directory name and filename that contains the data file.

The lower section displays the index information for the data file.  The Index File drop-down list lets you select any index file in the database directory.  If the index file is in a different directory, you must provide the full pathname.

3	Select the Maintain check box to associate this index file with your dBASE file.

4	To specify that an index file is unique, select the Unique check box that appears at the right of the index filename.

5	If the selected index has an .MDX or .CDX extension, you cannot mark the index file as unique.  Instead, you may mark the tags within the index as unique.  To do so, select the tag name in the Tag drop-down list and select the Unique check box that appears at the right of the tag name.

6	Click OK to save this information, or press Cancel.