Frequently Asked Questions

General

Q: What is the difference between your ODBC driver and the one I have heard about from Data Access Corporation?

They are opposites of each other. A bit of confusion has been caused by a new product from Data Access originally called the ODBC Driver. Data Access is adding the ability of the DataFlex Runtime language to talk to ODBC drivers from Sybase, Oracle and the like. What this product actually is, is not an ODBC Driver, but a DataFlex system that can talk to ODBC drivers, allowing DataFlex programs to read and write Oracle files, for example. Our product allows any ODBC enabled application to talk to DataFlex format files.

Q: Why is Flex/ODBC a Level 1 ODBC driver, and not Level 2?

ODBC levels are not versions, and one level is not "better" than another unless the underlying database supports it. Level 2 functions only provide greater performance if the underlying database provides similar functionality. In the case of DataFlex, being an ISAM level and not having full SQL capabilities, level 2 functions would need to be simulated by the ODBC driver, and this would not improve the performance or functionality of the driver. All popular applications support all driver levels.

Installation

Q: The installer refuses to start up.

Our installer application cannot run if the VER.DLL and DDEML.DLL files cannot be found. Check that these files exist and are in your path, or use the /M option to install to non-standard windows directory names.

Q: Can I use your driver on UNIX?

This is a driver for Microsoft Windows and ODBC applications. PC's running Windows which are able to address data stored on a UNIX host as a virtual DOS drive letter (using NFS for example) will be able to use this data in Windows applications.

Another thing to keep in mind is to make sure the DataFlex files are created in DOS format byte layout (Intel style). The DOS products need a certain format, and UNIX DataFlex will work with either style, so if files are formatted in non-DOS layout, they can simply be copied to a DOS system, rebuilt, then copied back to the UNIX system. The UNIX applications will run as normal after the conversion.

Q: I had the evaluation version working, now when I have installed a single-user code it no longer works.

The single-user version opens file exclusively, so if another user (or even another application on this same machine) is using the file in question, the open will fail. Network users require at least the 4 user version if other users are in the file along with the ODBC driver user. The evaluation version is multi-user. If you are having trouble with the single-user driver on a stand-alone PC, contact our support department.

Q: There is no data source for DataFlex in my control panel ODBC option
after I install.

You can add one manually by choosing the Add option.

Q: Does the 4 user version count my other DataFlex users?

No, just simultaneous users of the ODBC driver.

Q: I ordered a 4 user registration code but there is no place in the setup screen to enter the number of users.

You have an old version which did not support the user counting version, get the latest version from your dealer or our Internet web page.

Q: I installed a new version of Flex/ODBC and it is running as an evaluation version.

All versions of Flex/ODBC start out as evaluation versions until you install your registration code in the setup screen from the control panel. Current versions of Flex/ODBC keep the registration code when you update the product.

Q: I tried the evaluation version, but I need to see how this product performs with big databases or on a web server.

Contact your dealer and request a 30 day unlimited evaluation version.

Q: I can't install the driver, it conflicts with some file.

Make sure *all* applications are closed when you run the installation program. This includes the Microsoft Office Shell, any desktop managers, any mail programs, reminder programs, whatever. Make sure there is nothing in your startup folder. If you are in Windows 95/NT, bring up the close program screen (CTRL-ALT-DEL) and close all open programs except Explorer.

Our install adds standard components to your Windows environment, and they cannot be in use when the install runs. If this does not help, see the entry below.

Q: When I try to load the setup screen, it says I don't have enough memory.

This happens in certain rare cases. We have seen it happen on laptop machines, and Cyrix chip based machines in particular, with no other apparent difference. Report this to your support person.

Q: There is a setting for the digits of years (4 or 2 digit) in your setup screen. I have some of both, how can this work?

This setting affects writing of new data to DataFlex files and doing matches by date type fields. Queries from your data will automatically find and display both date formats in standard ODBC date format. You only need to change this option if you write to files or select by date, and you must choose one format.

Q: Dates from my file return in a format different than what I want.

Our driver returns dates in standard SQL date format. Most programs expect this universal format and you can change the way it displays in the Windows control panel date layout section.

Error Messages

Q: I can't see data in any of my files.

First, check that the driver itself is properly installed. You should be using a 32 bit ODBC driver for Windows 95/NT, and a 16 bit driver for Windows 3.x. The applications will use any drivers installed.

During install of the driver we create a test set of database files with a data source name of DataFlex Test32 (or DataFlex Test). Start up our VBDEMO application from the menu and choose Connections/Add New Connection. An ODBC dialog will start up offering you various data source names. Double click on DataFlex Test(32). Press the Tables button, you should see some table names in the grid. Now click Query and you should see standard DataFlex error messages from the FLEXERRS file. If you see this data your driver is properly installed.

If you still have a problem, it could be with your data source. Check the DFPath setting in the driver setup screen in the Windows Control Panel, and make sure it points to valid directory names (separated by ;) which point to the following files in the DataFlex system: *.CFG *.DAT *.K* *.TAG.

The path should not be a relative path (starting with the current directory), but a full directory path to each subdirectory required. No period (.) characters should be used in the path. The reason for this is that you are running an application (Word, Excel) from it's own directory, not from your DataFlex directory, so relative paths do not work. One work-around, if you cannot change your filelist, is to set the starting directory of the application to your DataFlex directory, this will force it to work, but may affect other add-on programs.

Reindex the file to test it for integrity with DFINDEX.EXE.

Check the filename.TAG file and make sure it does not include any "binary" characters such as end-of-file or line feed characters, especially at the end of the file.

Make sure the TAG is in the same subdirectory as the DAT file. This is a limitation of the DataFlex API tool we use to read DataFlex files (16 bit only).

If the file has more than 100 fields, this could cause stack errors in 16 bit drivers which have smaller memory models. Select only the fields you need for the particular query you need to do.

If field names in the designated data file contain "_" or "@" or "#" characters, this causes problems for some applications which assign these characters special meaning. Change the field names in the filename.TAG file or make a new set of modified TAG files for Flex/ODBC and point your DFPATH to this directory first.

Q: I can read a file, but I get ISAM errors when I try to edit/delete/create records.

This typically happens because of one of the following:

Header Integrity Checking turned On - This feature can be turned off in the DFFILE program to fix this error. The 16 bit version of the Data Access API which Flex/ODBC uses to update files does not support Header Integrity Checking, which is a form of checksum in the data file header. The 32 bit version does not suffer this limitation.

Invalid header - Some applications (notably Expandable Software) have used the DataFlex MAKE_FILE command to create data files. The data files created by this command are not compatible with the API that our program and programs like WinQL use to access data files. If you open the desired file in DFFILE and re-save it without change, this will repair the invalid header.

File read-only - This user on a network has insufficient rights to update a file on a network, or the file is marked read-only on disk.

Overlap fields - These special type fields are supported by DataFlex but by no other system, so sometimes you will get the error "Multi-user conflict - another user changed the record" because this is an untyped binary field and the comparisons always fail. Simply remove the overlap type fields from your query.

Q: I get a Syntax Error message and can't find the problem.

Look at the statement and check for the following:

In the help file you will find the reserved words list. Make sure none of your field names is in this list, and if they are, enclose them in double quote characters (")

Values to be compared or placed in a file must be surrounded by single quotes (') unless they are numeric, then they should not.

Q: My application requires certain functions (between, outer joins, create table) that give me a syntax error in your driver.

We are adding new features all the time, check with our sales department on your particular needs.

Q: I get the message "cannot open collate.cfg file".

Copy the COLLATE.CFG file from the default Flex/ODBC install directory to the same directory where you keep FILELIST.CFG - the API must be able to find this file.

Q: When the list of available databases comes up, is there a way to filter out certain confidential databases so they cannot be selected?

Modify a copy of the filelist.cfg file and place it in a directory before the data directory in the driver setup path. The driver cannot open files that are not in the filelist.

If you do not have the DFFILE program required to make changes to the filelist, use the sample application FLIST.FLX in the testdata folder.

Q: Please explain how Flex/ODBC does multi-user operations.

Similarly to how DataFlex does it.

On an UPDATE command, a SELECT is run to find qualified records, when one is found, REREAD is run, then the record is re-qualified, the specified edit fields are changed, the UNLOCK command is run, then we move to the next record.

On INSERT a LOCK is run, a new record is saved, and then UNLOCK is run.

Q: How can I update a system (1 record) file value that could be changed by other users during the time between my SELECT and UPDATE commands?

On your SELECT statement, extract the value of the field, lets say MAIN.INV_NO is found to have a value of "247" and you assign it to variable OldInv.

Next you would create a variable NewInv and set it to "248", which is the old value plus one, which is what you want to set it to. Then run an UPDATE statement something like:

UPDATE main SET inv_no = :NewInv WHERE inv_no = :OldInv

If the number of rows updated is 1, the update worked. If not, the value changed, retry this entire process again until it works.

Q: I need the Swedish/German collating sequence for files.

These files can be obtained from your dealer. Specify whether you need the 16 bit (replacement API) or 32 bit (collate.cfg) file.

Q: How can I find out more information about how this driver and ODBC works?

There are many good books available on ODBC programming and SQL, as well as specific references on using ODBC with various languages and tools.

If you want to see how the driver works, or you need to provide a log for our technical support department, go to the Windows Control Panel, click on the ODBC 32 icon (ODBC for 16 bit), Click on the DataFlex Data datasource, and click the Configure or Setup button. In the window labeled Trace File enter an ASCII file name like c:cmytrace.log. Click OK and exit the control panel. All calls you make to our ODBC driver will now be logged until you clear this filename. Note: Microsoft ODBC has a trace facility too, but this has no driver specific information and will not help us find your problem.

Microsoft Office/Access/Excel/Word

Q: I can't find the DataFlex driver from Microsoft Office/Word/Excel.

The default installation of Microsoft Office (typical or standard installation) does not include the helper application Microsoft Query. This component is required to access any ODBC database from within the Office package.

Re-run the Office install program and choose Custom Installation, then choose Data Access tools, this will install Microsoft Query and related tools for accessing external data. It will not re-install the entire package or lose any documents or settings.

Under Excel, an additional step is required to go to the Add-ins menu and check the box for ODBC to allow this to work.

Microsoft Query is run by the application (Word, Excel) and allows you to choose the data you want to return to the document, and then Query will not be required again until you want to modify the data query.

Remember that Flex/ODBC is an ODBC database to Office, and it will not show up next to dBase and Paradox, it is categorized as either SQL Databases or ODBC Data depending on your version of Office.

Microsoft states that standard (non Office) versions of Word and Excel should work with ODBC drivers by using the ODBC Driver Kit, which can be downloaded from their web site at: http://www.microsoft.com.

Q: Why do I get "Invalid Connection String" or other errors from Microsoft Word when returning data from MS Query? MS Query appears to work fine.

This is a bug in Microsoft Word related to pathing. MS Query returns a connection string back to Word which is separated by semi-colons. The problem is that they assume only one directory will be mentioned in the path to data files setting (DFPATH for us), and multiple directories are also separated by semi-colons, causing the problem.

To work around it, change the DFPATH setting in the control panel under the DataFlex Driver to "." (a period only), and use a DFPATH environment variable loaded in DOS in your AUTOEXEC.BAT file.

Q: Why is the driver so slow?

Flex/ODBC is a lightning fast driver for DataFlex files using ODBC. The driver works with all front-end applications which can access ODBC, some of which are faster than others.

This question is almost never asked by our users using C as a front end language for ODBC, nor by report writer users with Crystal, or DBMS users with Delphi. These users will see immediately how fast the driver is because their applications are optimized for ODBC speed.

It is almost always asked by users of Microsoft Access, whose first operation is to open the largest file they have in their DataFlex system in an Access Grid control. They notice that the grid comes up quickly, but if they page down to the next screen-full of records, it takes a while. Why Access is slow compared to other systems can be easily explained.

Access is overloaded with multi-user functionality, meaning that features like updating all stations when a record changes on-line and other features are easily accomplished by the native Access file format. When Access uses ODBC however, it attempts to do the same thing. For instance, when you open a multi-user grid on an ODBC data file, it must read the entire file into memory before continuing. This continues in the background, and when you press page-down, Access waits until the file has been completely read before beginning another query of the entire file, starting with the last record of the previous screen.

Other DBMS systems optimized for ODBC, such as Delphi, query only the number of records needed to fill the current screen with data, and does not continually refresh the database on the screen for no reason.

Access only has this problem in Grid controls, which is unfortunately the first thing people use with our driver. However, if you create a query and send it as input to a report, you will see how fast our driver can run under Access.

When programming with SQL (the transport language of ODBC drivers) it is a good idea to think of an SQL table as being a "cloud" of data with potentially unlimited records. You should therefore design queries and views of only the fields and records required for the current transaction or report, and not attempt to query all records in a given table, which may overload the system.

DataFlex programs are programmed in a single record orientation, while SQL/ODBC is set based. Access attempts to read each result from a data query into memory, as if your data were a spreadsheet, and DataFlex files tend to be very large. Applications built with Access should assume that large files will be used and show only the data appropriate to the current transaction in a grid control.

Microsoft Access is optimized to work with it's built-in data manager only (MDB files), and any Access programmer who has used ODBC will tell you about the limitations Access has in this area. Other packages work very well with ODBC data drivers.

If you would like to see what Access is doing that makes it appear to "lock up" while running a query, you may like to turn on our debug control panel. Details can be found later in this document.

Q: Why does Access say there are only 101 records in the file, I know there are more.

Access shows 101 records in a grid by default if no index has been specified. Choose an indexed field and sort (a-z) and it will show the full number of records in the file when it has finished reading the file into memory.

Q: I can run the first session of Access/Delphi fine, but the second time produces an ISAM error.

Certain development platforms make it hard on us because they re-open the same file in several sessions. If this problem occurs, try one of the following settings. Using windows Notepad, edit the file ODBCINST.INI and in the DataFlex Driver section try one of these lines:

Deinitialize=Never
Deinitialize=EndOfSession
Deinitialize=EndOfDLL

Q: I have executed a query in Access and it seems like the system is just hanging up.

We have added a debug panel in the 2.0 versions for anyone that suspects a problem with Access or bad performance on index jump-ins. To make it work put in the ODBCINST.INI section for the driver:

DebugPanel=Yes

This will turn the feature on and it will show interactively which index was chosen, the current record filename, and allow you to exit a runaway query.

Q: How can I format DataFlex data as it appears in Microsoft Word?

Search the Word Help topic: Format merged information

To format numeric values in Microsoft Word:

Formatted:

This letter is to inform you that your current balance is $3033.00 and your sales to date this year are $3154.32

Source:

This letter is to inform you that your current balance is - MERGEFIELD BALANCE c# $#.00d and your sales to date this year are - MERGEFIELD YTD_SALES c# $#.00d

To show ASCII data as upper case on first letter only (if data is stored all uppercase):

Formatted:

Elizabeth Scott

Source:

- MERGEFIELD FIRST_NAME c* capsd - MERGEFIELD LAST_NAME c* capsd

Keeping Current

Q: How can I keep up with the latest news on Flex/ODBC?

Subscribe to our announcement mailing list via e-mail. Send your request to lists@flexquarters.com stating that you would like to be on the Flex/ODBC mailing list.

Q: How can I get the latest version of Flex/ODBC?

To download the latest version:

E-mail:
send a blank e-mail message to:
flexodbc16.uue@flexquarters.com (for 16 bit version)
flexodbc32.uue@flexquarters.com (for 32 bit version)
The file will be e-mailed to you immediately in uuencoded format.
If you are a CompuServe user, you will need a uudecoding program, GO IBMFF

Internet WWW web page:
http://www.flexquarters.com
choose Products-Flex/ODBC, select the version you wish to download.

CompuServe CIM:
Use CompuServe web browser with above instructions





(c) FLEXquarters