		Q+E Database Library
		Version 2.0.1
		March 7, 1994

This READ.ME file contains information not included in the 
QELIB Programmer's Guide.  Some of this new information can 
also be found in the QELIB Help files.  This file contains 
information about the following topics:

Installing QELIB
What's New for QELIB 2.0?
New Functionality for Version 2.0.1
Replacing Back-level DLLs
qeRecLock Limitation
Correct TraceOptions Setting in QELIB.INI
New Fast Trace Option
qeColType and qeColDBType Values
Handling Changes to the ODBC hstmt
Format String Restrictions for qePutChar
Restrictions for Using qeMoreResults
Supplying Parameter Length to qeBindParamDecimal
Format Restrictions for Date, Time, Binary Parameters
Statement Persistence in Auto-commit 
Using the Correct DB-LIB DLLs with SQL Server
Distributing QB.HLP
Information For Btrieve Users
Information for Microsoft Access Users
Information for Oracle 7 Users

For new information on the Q+E Drivers supplied with QELIB, 
see the file QDREAD.ME.


		Installing QELIB

QELIB includes a Setup program that installs QELIB, the Q+E drivers, 
the ODBC Setup icon, and sample files onto your computer. 
The Setup program is a Windows program. To install QELIB,
insert disk 1 into drive A. Pull down the File menu in the Windows 
Program Manager, and choose the Run command. In the Run dialog box, 
enter:

	A:\SETUP

If you install from a drive other than A:, modify the above command
accordingly. Setup allows you to choose the sample applications and 
drivers you wish to install. After Setup installs QELIB, it displays 
a dialog box that lets you configure the data source specifications 
sections in the ODBC.INI file for the drivers you installed. All 
supporting client software must be installed and properly configured 
before that client can be configured from ODBC.

You can also reconfigure any data sources already installed in order to 
use the new drivers. To reconfigure existing data sources, double-click 
the Q+E Driver Help icon and select the "Configuring Data Sources" topic
for the driver you have installed.  

NOTE TO USERS OF WINDOWS 3.0: In order to use QELIB’s
Help files, you must copy the Windows 3.1 Help compiler into 
your Windows directory. You can obtain this file from Q+E Software's 
Bulletin Board Service. Call (919) 851-1152 between 9:00 a.m. and 
5:00 p.m. Eastern Standard Time for more information.


		What's New for QELIB 2.0?

- ODBC driver support: QELIB 2.0 will now connect to any ODBC-compliant 
  driver.

- Current record operations: Insert, update, and delete based on the current
  cursor position of an hstmt.

- Parameterized queries: SQL statements may now have parameters, whose values
  can be textually substituted or bound to program variables.

- Query Builder: Q+E Software's Query Builder is made available to the user
  via a function call.  This tool allows the easy, interactive, graphical
  construction of SQL statements.

- Bind variables: The ability to bind program variables to columns in Select
  statements is enhanced, with conversions done automatically.

- Stored procedures: Multiple result sets may be returned from a single hstmt.

- Query By Example: Existing queries may be modified and rerun, using 
  conditions applied to columns of Select statements.

- Parsing: Functions are available to provide the individual clauses of a 
  Select statement.


		New Functionality for Version 2.0.1

With Version 2.0.1, QELIB now accepts the following:

- ORDER BY clauses on column aliases.
- ODBC standard syntax for outer joins.


		Replacing Back-level DLLs

Using older versions of QEUTL03.DLL, QEMDS03.DLL, QEFLT03.DLL, or 
QEBAS03.DLL with QELIB version 2.0.1 may cause problems.  If you are 
a licensed user of the Q+E ODBC Pack, version 1.1 or earlier, be sure 
to use the newer versions of these DLLs that are included with QELIB 
version 2.0.1.


		qeRecLock Limitation

For some database systems, QELIB must maintain an active hstmt in 
order to lock records with qeRecLock.  This will not work on those 
database systems or gateways that do not support either multiple 
connections or multiple statements per connection.


		Correct TraceOptions Setting in QELIB.INI

QELIB.INI File - when setting the TraceOptions setting in the QELIB.INI 
file, be sure to set it equal to a decimal value.  For example:

TraceOptions = 3				       /* CORRECT   */
TraceOptions = qeTRACE_NON_VAL_CALLS + qeTRACE_USER    /* INCORRECT */


		New Fast Trace Option

With QELIB version 2.0.1, a new tracing option is available, 
qeTRACE_NO_FLUSH (x0020), that allows faster tracing by writing trace 
strings to disk in blocks instead of one at a time.  Using this method 
can cause the loss of some trace information if your program terminates 
abnormally--do so only when your application is reasonably stable.

Copies of the QELIB Programmer's Guide dated February 1994 incorrectly 
state on page 352 that the value of this constant is x0030.  
As stated above, it is x0020.


		qeColType and qeColDBType Values

The following table shows the constants and corresponding values values 
returned by qeColType and qeColDBType for each ODBC data type:

ODBC Type		qeColType		qeColDBType
---------		----------		----------
SQL_CHAR		qeCHAR (1)		qeCHAR (1)
SQL_VARCHAR		qeVARCHAR (2)		qeVARCHAR (2)
SQL_LONGVARCHAR		qeVARCHAR (2)		qeLONGVARCHAR (100)
SQL_DECIMAL		qeDECIMAL (3)		qeDECIMAL (3)
SQL_NUMERIC		qeDECIMAL (3)		qeDECIMAL (3)
SQL_BIT			qeSMALLINT (5)		qeBIT (110)
SQL_TINYINT		qeSMALLINT (5)		qeTINYINT (109)
SQL_SMALLINT		qeSMALLINT (5)		qeSMALLINT (5)
SQL_INTEGER		qeINTEGER (4)		qeINTEGER (4)
SQL_BIGINT		qeDECIMAL (3)		qeBIGINT (108)
SQL_REAL		qeFLOAT	(6)		qeFLOAT	(6)
SQL_FLOAT		qeDOUBLEPRECISION (7)	qeDOUBLEPRECISION (7)
SQL_DOUBLE		qeDOUBLEPRECISION (7)	qeDOUBLEPRECISION (7)
SQL_BINARY		qeCHAR (1)		qeBINARY (101)
SQL_VARBINARY		qeVARCHAR (2)		qeVARBINARY (102)
SQL_LONGVARBINARY	qeVARCHAR (2)		qeLONGVARBINARY	(103)
SQL_DATE		qeDATETIME (8)		qeDATE (111)
SQL_TIME		qeDATETIME (8)		qeTIME (112)
SQL_TIMESTAMP		qeDATETIME (8)		qeDATETIME (8)

For information on how native database system data types map to ODBC 
data types, see the Q+E Database Driver Reference or double-click the 
Q+E Driver Help icon.


		Handling Changes to the ODBC hstmt

QELIB may need to close and re-execute the ODBC hstmt associated with 
your query.  Thus, whenever you make a QELIB call, the ODBC hstmt is 
subject to change.  This change has no effect on the QELIB hstmt.  
However, if you make direct ODBC calls, you should call qeGetODBCHstmt 
immediately before you expect to use the ODBC hstmt to make sure you 
are using the active ODBC hstmt.


		Format String Restrictions for qePutChar

When using qePutChar with format strings to format dates and numbers, 
you are responsible for ensuring that the value passed to qePutChar
matches the format string being used.  QELIB will not reformat the 
incoming string to match the provided mask.


		Restrictions for Using qeMoreResults

The function qeMoreResults can be used only with databases that support
stored procedures.  It will return qeEOF (-5) when used with a database
that does not support stored procedures.


		Supplying Parameter Length to qeBindParamDecimal

qeBindParamDecimal must be supplied the number of bytes in a 
BCD value of the same precision as that of the underlying 
database column.  For example, if the underlying decimal 
column has a precision of 15, you must supply a length of 8 
to qeBindParamDecimal.  To determine the number of bytes, use the 
following formula:

     bytes = (Precision+2)/2


		Format Restrictions for Date, Time, Binary Parameters

The date/time/binary escape format (e.g. [d'yyyy-dd-mm hh:mm:ss.ssssss']) 
described in the manual is for use in SQL statements executed through 
qeExecSQL and qeSQLPrepare only; the qeBindParam and qeSetParam functions 
cannot interpret them.  When using the following functions, be sure to use 
26-byte strings (e.g., yyyy-mm-dd hh:mm:ss.ssssss):

	qeBindParamDate
	qeBindParamTime
	qeBindParamDateTime
	qeSetParamDate
	qeSetParamTime
	qeSetParamDateTime

Binary data must be passed as a string to qeBindParamBinary and 
qeSetParamBinary.


		Statement Persistence in Auto-commit Mode

The qeSetSelectOptions function lets you choose among three options 
that determine the extent to which  QELIB uses log files to enable 
you to continue fetching and updating records after a transaction ends 
(qeSELECT_PERSIST, qeSELECT_TRUNCATE, and qeSELECT_INVALIDATE).
Because these settings affect what happens when changes are committed, 
they also affect statement persistence when in auto-commit mode. Because 
auto-commit mode represents an implicit commit of each change you make, 
whatever you choose to have happen at the end of a transaction will also 
happen whenever a change is made in auto-commit mode. Therefore, if you 
intend to use auto-commit mode and change multiple records returned by a 
statement, you should use the default setting of qeSELECT_PERSIST.


		Using the Correct DB-LIB DLLs with SQL Server

Microsoft DB-LIB DLLs (DBNMP3.DLL and W3DBLIB.DLL) cannot be used 
to connect to MDI's gateway.  Only the Sybase DB-LIB DLLs of the same name
can be used.  Likewise, Sybase's DB-LIBs will not connect to Microsoft's 
SQL Server.  Failure to use the correct DB-LIBs will result in a stack 
fault of Windows' KRNL386.EXE.


		Distributing QB.HLP

An additional file that you can distribute with your QELIB applications 
is QB.HLP, a context-sensitive help file that is called by the Query 
Builder.


		Information For Btrieve Users

Avoiding Memory Problems
------------------------
Our Btrieve driver makes use of Novell's WDDLSVCS.DLL, which currently 
has a memory leak causing applications that execute many SELECT 
statements to run out of memory.  As a workaround, users should create 
the following statement in the Btrieve section of their ODBC.INI file:

	FileOpenCache=n

where n is equal to the number of open tables in an application.
 
Ensuring Correct Use of Keys
----------------------------
Before committing a transaction in which you insert records that will be 
updated later with additional values, you must first set a primary key 
using only those columns that you know contain user-defined values.  
This is necessary because Btrieve does not support null values; when 
new records are inserted that contain blank fields, Btrieve converts 
the blanks to zeros.  This behavior is evident whenever you try to 
update a newly inserted record only to find that no rows were updated.  
By setting primary keys using only those fields that you are certain will 
contain user-defined values, you ensure that QELIB will always be able to 
find the newly inserted records.


		Information for Microsoft Access Users

In QELIB 2.0, the Q+E Query Builder could not provide a list of the tables
inside an Access database file (.MDB).  You could, however, access a table 
by entering its name directly in the Tables box.  This 2.0.1 version of 
QELIB provides a work-around for this problem until a fix is available.  
To have the Query Builder display a list of the tables in an Access 
database, you must edit your ODBC.INI file and add the following line to
each Access data source defined there:

	QeDatabaseIsA=2 

 
		Information for Oracle 7 Users

Oracle 7 allows you to pass query optimization hints in comments 
within a SQL statement.  In QELIB 2.0 these comments were inadvertently
stripped out.  This problem is corrected in 2.0.1; you can now pass 
these comments through to Oracle.


End of READ.ME
