ContentsIndexPreviousNext

3.2 Defining the Data Source

Although the AcuODBC Configuration property sheet contains eight tabs, you can fully define a data source with the information you provide on the General tab. The other tabs contain additional optional information or instructions to the AcuODBC interface.

Enter information about the data source as indicated below.

Data Source Name

Enter a name that represents the type of data in this group of data files or the type of query that will be made against these files. Since this name will be used every time a user opens this data source, select a name that is meaningful to users of this data source. (For example, "ACME Payroll" might be used for payroll files for the ACME Corporation.)

The name of the data source must be less than or equal to 63 characters in length. Follow the Windows file-naming conventions when using special characters in data source names. The name you choose must be unique.


Important: If you are configuring a remote data source on the client, specify only the Data Source Name on this tab. See Chapter 9 for information on configuring remote data sources.

XFD Directory

Enter the full pathname of the directory containing the data dictionary (".xfd") files that must be accessed. Each Vision or relative file requires a corresponding ".xfd", and all the ".xfd" files must be in one directory. See section 6.2, "XFD Files" for more information on these files.


Notes: For SQL compatibility, to improve performance, and to ensure that data files and ".xfd" files have the same base name, use underscores, rather than hyphens, in table names. See section 6.2, "XFD Files" for more information.

To ensure accuracy, Acucorp recommends that you use the browse buttons to specify directories and files. If you do not use the browse buttons, make sure that you accurately enter the names of any requested files and directories. AcuODBC does not check to see if they exist. If you enter an incorrect name, you will not be able to bring the external data into your application.

In this field, you can specify a local directory or, if your files reside on a remote file server and you are using AcuServer, a remote directory. (Note that ".xfd" files residing on the same server as AcuODBC Server are considered local.) If you specify a local data dictionary directory, AcuODBC looks for all the ".xfd" files present in this directory, and lets you open the tables that relate to the data dictionaries.

To specify a remote directory, use the following syntax:

@server-name:directory-path

where server-name is the name of the UNIX or NT server on which the directory containing the data dictionaries resides.

If you specify a remote directory, you must add a sequential ASCII file called "xfdrmt.dir" (lowercase) to that remote directory. This file must list the names of the ".xfd" files that have to be accessed by this DSN. These XFD filenames must match the actual names of the ".xfd" files exactly, including the case on UNIX systems. The XFD files included in the "xfdrmt.dir" file must reside in the same directory as the "xfdrmt.dir" file itself.


Note: If the XFD files are on a remote UNIX server and you are accessing them through AcuServer, they must have a lowercase extension of ".xfd", regardless of the value of the File Case field on the Advanced tab. Case does not matter on Windows systems. For example, the XFD file can be named "ACCOUNTS.xfd".

If you are using AcuODBC Server and the remote server is a UNIX server, the entire name of XFD files must be lowercase, such as "accounts.xfd". In addition, the entries in the "xfdrmt.dir" file must also be lowercase.

If the data dictionaries are remote, you can open tables only for the files that are listed in this "xfdrmt.dir" file. Storing data dictionary files on the server can help decrease the effort required to maintain these files. That is because modification of data dictionary files on the server directory makes any changes immediately available to all the clients.

Here is an example of an "xfdrmt.dir" file when accessing remote files using AcuServer. Note the lowercase file extensions:

ACCOUNTS.xfd
CLIENTS.xfd
CODES.xfd
PATIENTS.xfd

If you are using AcuODBC Server on a remote UNIX server, the "xfdrmt.dir" file would look like this:

accounts.xfd
clients.xfd
codes.xfd
patients.xfd

Tip: For performance reasons, you should keep your data files together with the XFD files only if you have a few data files to work with. If you have many files, we recommend that you create several directories containing only the XFD files necessary for a particular DSN or query type. You can then keep the data files together and use the "Data Directory" field to specify the location of the data files.

Data Directory

This field specifies the directories AcuODBC searches for data files. It is equivalent to the FILE_PREFIX configuration variable. By default, this is the same directory specified for ".xfd" dictionaries when initially defining the data source name. If your data files reside in a different directory than the ".xfd" files, change the value of Data Directory to specify the correct location. If your data files reside in several locations, specify those locations in this field.

Leaving this field blank results in AcuODBC assigning the path of the XFD directory to this field. (You will see the value in this field the next time you open the property sheet.)

Populate the field as follows:

1. Enter the name of a directory you want to include in the search path. You can type a path or use the Browse button to locate the directory. Note that if you select the directory using the Browse button, you must click OK. Double-clicking the name of the directory does not insert the name in the entry box. The path appears in the entry box of the Data Directory field.

2. Click Add. The path to the directory now appears in the lower box in the Data Directory field.

3. Repeat these steps for each directory you want to add to the search path. The paths appear in the box in the order in which you enter them.


Tip: Here's a quick way to add entries to the search path. Double-click on a path already listed that is similar to the path you want to add. When the path appears in the Data Directory edit field, make any necessary changes to components of the path, and then click Add. The new path appears at the bottom of the list of directories in the search path.

For optimum performance, list the directories in the order in which you want AcuODBC to search them. To move a directory up in the search order, select that directory and click Move Up. To move a directory down in the search area, select that directory and click Move Down. To delete a directory from the search path, select that directory and click Delete.

Data File Extension

In this field, specify the file extension used for your data files (for example, ".dat"). When AcuODBC looks for a file, it looks only at files with the extension listed in this box. If you leave this box blank, AcuODBC looks for data files with no extension in the XFD directory or Data Directory indicated. This field is equivalent to the FILE_SUFFIX configuration variable.


Note: Files residing on remote UNIX servers must have lowercase file extensions.

After you specify this information, the DSN is fully defined. The remaining tabs on this property sheet control various aspects of AcuODBC behavior, and some can aid you in troubleshooting.

More:

To modify data source parameters

To delete a data source name