                Quiet SQL			tarasdom@iname.com
                v2.0				http://members.tripod.com/~tarasdom/index.htm

(This is English documentation. 
 Please look at file read_rus.txt for Russian text)

----------------------------------------------------------------------
THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY WARRANTIES AS TO
PERFORMANCE OR MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER
EXPRESSED OR IMPLIED. I SHALL NOT BE LIABLE FOR ANY DAMAGES FOR LOST
PROFITS OR REVENUE, LOSS OF USE OF DATA, DISKS, OR PROGRAMS, COSTS OF
RECOVERING SOFTWARE OR DATA, OR THIRD PARTY CLAIMS.

This Program is not specifically developed or licensed for use in any
nuclear, aviation, mass transit, or medical application or in any
other inherently dangerous application. I shall not be liable for any
claims or damages arising from such use of this Program.
----------------------------------------------------------------------
                What is QSQL ?

QSQL (means "Quiet SQL") is SQL AnyWhere runtime ISQL replacement. 

Features:
        - command line interface
        - small size and memory footprint
        - it can process the major (not all) of SQL queries
        - export/import for DBF files. 

It has not any windows, mouse support, hyperhelp, http references and 
so on...

----------------------------------------------------------------------
Command line keys:

You can use both '/' and '-' for keys. 
Wildcards * and ? in file names currently are NOT allowed.
Use space for text parameters (like "-d go").

 SQL: name of SQL file    (parameter can be omitted)
 OUT: name of output file ( can be TXT or DBF file, parameter can be omitted)
 IN: name of input file   ( DBF file only , parameter can be omitted)
 b: not print banner (default is OFF)
 c: connect parameters (default is "UID=dba;PWD=sql")
 q: quiet mode - no messages (default is OFF)
 s: specify command line to start database (historical)
 v: verbose mode (default is OFF) 
	displays additional information about executing of SQL queries
 d: SQL delimiter (default is ';')
 EMPTY_AS_NULL: treat empty strings as NULL 
	(default is FALSE, field is filled with spaces)
 COMMIT_ON_EXIT: commit on exit (default is ON)
 AUTO_COMMIT: commit after every command (default is OFF)
 BELL: bell on error (default is OFF)
 STOP_ON_ERROR: stop on error (default is ON)
 OVEROUT: overwrite output file if exists - (default is ON , 
	for TEXT format ONLY, appended new text if OFF)
 DBF: output as DBF file (default is ON)
        DBF+ output is DBF file
        DBF- output TEXT file
 STD_DAT: set standard data mask (YYYY-MM-DD, default is FALSE)
        It is useful if Your database has non-default DATE_ORDER and DATE_FORMAT options
 BLOB: write mode for BLOB fields (char, dbase, clipper, fox )
	Unusable with DBF-
	"dbase" and "clipper" are equal in current version

You can see examples in the EXAMPLES.TXT.
----------------------------------------------------------------------
Technical info (see also CT_QSQL.* files for C constants):

Errorlevel codes:
 0   ERR_NOERR          No errors
 1   ERR_COMMLINE       Bad Command line
 2   ERR_NODATAFILES    No datafiles for filemask
 3   ERR_CREATE_FILE    When create file
 4   ERR_OPEN_FILE      When open file
 5   ERR_READ_FILE      When read from file
 6   ERR_WRITE_FILE     When write to file
 7   ERR_CLOSE_FILE     When close file
 8   ERR_RENAME_FILE    When rename file
 9   ERR_REMOVE_FILE    When remove file
10   ERR_LEN_FILE       Illegal file length
11   ERR_PROCESS_FILE   When process file
12   ERR_FULLPATH       Error in _fullpath
13   ERR_CONNECTSQL     When Connect to SQL server
14   ERR_DISCONNECTSQL  When DisConnect from SQL server
15   ERR_SQL            when execute SQL operation
16   ERR_CREATE_TABLE   when creating table
17   ERR_INSERT_TABLE   when insert to table
18   ERR_NOMEMORY       not enough memory for malloc operation
19   ERR_CREATESQLDA    alloc_sqlda returned NULL
20   ERR_FILLSQLDA      fill_sqlda returned NULL
21   ERR_ALLOCBUFDTA    when allocate memory foe bufferDTA
22   ERR_PROCNOTFOUND   stored procedure is not found
23   ERR_EXEC_PROC      when execute procedure
24   ERR_FETCH_PROC     when execute procedure (FETCH operation)
25   ERR_FIELD_QUAN     different quantity of fields
26   ERR_CONVERT        when convert types
27   ERR_FIELD_TYPE     incorrect field type
28   ERR_FIELD_TYPE_NOT_IMPLEMENTED     field type is not implemented
29   ERR_INPUT                          error in INPUT keyword
255  ERR_USER_BREAK                     user break

----------------------------------------------------------------------
Notes:

Use INPUT command for loading data
        INPUT [INTO] tablename;
Table has to exist before loading.

SELECT and CALL are used to output into the file.
Currently only one select query is allowed. 
OUTPUT command is not supported.
Float and Double SQL AnyWhere type values are saved as CHAR(30)

----------------------------------------------------------------------
Some more words:

I was trying very hard for a long time to connect from DOS FoxPro to 
the SQL AnyWhere server. I didn't find any "direct" way to do this.  
I decided to write SQL queries into the file, execute this file with 
RtISQL and then process resulting DBF with FoxPro as usually. 
Unfortunately, standard RtISQL needs a large volume of memory and
it's really impossible to use it. So, I've written this utility...

If You can any comments or suggestion, please e-mail me tarasdom@iname.com

--
SY Taras Domansky       /* No Fate */
--
