home *** CD-ROM | disk | FTP | other *** search
-
- General Information Page 1 of 7
-
-
- Quasar SQL For Windows
-
- Release 2.0 - November 1991
-
-
- GENERAL INFORMATION
-
-
- Copyright (c) 1991-92 by Stellar Industries
- All Rights Reserved
-
-
- Quasar SQL For Windows release 2.0 includes a significant new
- feature: the Quasar SQL Application Programming Interface (API).
-
- What is the Quasar SQL API?
-
- The Quasar SQL API is a powerful tool that enables you, the
- software developer, to have full access to a modern, highly
- optimized ANSI standard SQL database manager: the Quasar
- Database Administrator. Your programs written in any
- language which can access dynamic link libraries can also
- access the Quasar SQL API. These languages include 'C',
- 'C++', 'Visual Basic', 'Pascal' and most assemblers. In
- fact, any program which can access the Microsoft Windows
- environment can access the Quasar SQL API. Microsoft
- Windows itself is a dynamic link library.
-
- The Quasar SQL API is your gateway to modern database
- technology. With a little more than a dozen functions and
- only 4 data structures you can perform almost any database
- task.
-
- How does the Quasar SQL API work?
-
- "How is this done?" you might ask. Well, while the Quasar
- Database Administrator is sophisticated, complex and fully
- optimized for maximum performance: the Quasar SQL API is
- simple and straight forward. The Quasar SQL API effectively
- buffers you from all the complex tasks of parsing, query
- analysis, query optimization, query tree construction, etc.
-
- How do I link to the Quasar SQL API?
-
- When programming in 'C', you need to do only three things to
- include all the power of SQL in your application:
-
- 1) When you link your object modules, include the SQL.LIB
- import library along with libw.lib.
-
- 2) Include the SQL.H file (e.g. "#include <sql.h>") in
- your source code.
- General Information Page 2 of 7
-
-
- 3) Put the Quasar Database Administrator (DBA.EXE) and
- Quasar SQL API (SQL.DLL) someplace where windows can
- find them (usually in your windows directory).
-
- When programming in 'Visual Basic', you need to do only two
- things to include all the power of SQL in your application:
-
- 1) Be sure to use the SQL.GBL file included with the
- Quasar SQL API. Note that the 'C' style prefixes used
- with variable names (i.e. the 'n' in nResultCode, and
- the 'sz' in szErrorMessage) are not used with 'Visual
- Basic'.
-
- 2) Put the Quasar Database Administrator (DBA.EXE) and
- Quasar SQL API (SQL.DLL) someplace where windows can
- find them (usually in your windows directory).
-
- How do I use the Quasar SQL API?
-
- Your program can login to the Quasar Database Administrator
- (SqlLogin), open a cursor (SqlCursorOpen) and execute a
- query (SqlExecute). The query itself is passed to the
- Quasar SQL API as a simple text string. The Quasar SQL API
- does all the work for you. To get your answers back (from a
- SELECT statement, for example) you simply fetch them one at
- a time from the Quasar SQL API. You can fetch the first
- record (SqlFetchFirst), last record (SqlFetchLast), next
- record (SqlFetchNext), previous record (SqlFetchPrevious) or
- even a record at a position you specify
- (SqlFetchPositioned).
-
- You can have several cursors open at a time so that you can
- access your data the way you want.
-
- When you're all done, close your cursors (SqlCursorClose)
- and log out (SqlLogout).
-
- How can I check out my SQL statements?
-
- You can check out your SQL statements using the Quasar Query
- Editor (QE.EXE) included with the Quasar SQL API. The
- Quasar Query Editor allows you to type in the query your
- program is going to send to the Quasar SQL API and have it
- execute right there in front of you. You'll get all the
- results back on the screen where you can verify it's what
- you expected. In fact, the Quasar Query Editor uses the
- Quasar SQL API the same way your program does.
-
-
-
- Unpacking and Installation Instructions
- General Information Page 3 of 7
-
-
- Quasar SQL For Windows is provided on a single high density
- diskette. The contents of the diskette are defined in the
- included PACKING.LST file.
-
- Efficient operation of SQL For Windows requires that you use a
- disk cache manager (such as MicroSoft's SMARTDRV.SYS). For
- superior performance use a disk cache manager which also caches
- disk writes, such as Norton Disk Cache (available with Norton
- Utilities) or Hyperdisk Disk Accelerator (available as shareware
- from HyperWare*). We at Stellar Industries recommend Hyperdisk
- Disk Accelerator with which we observe a three to six fold
- performance enhancement verses SMARTDRV.SYS. Hyperdisk is
- available on many BBS's as HYDK421.ZIP. Documentation for these
- disk cache managers should be carefully reviewed.
-
- Adding indices to tables greatly enhances performance. A simple
- SELECT which extracts 5 records from a table of 3000 takes 10.6
- seconds without an index. The same SELECT statement takes only
- 0.6 seconds when there is an index on the table.
-
- While indices may be created at any time, we recommend that you
- create indices immediately after you create their base tables,
- otherwise CREATE INDEX has to read and rewrite all data which is
- already in the table.
-
- The importance of a good disk cache manager and thoughtful
- database design including the use of indices (where appropriate)
- cannot be over emphasized.
-
- In order to properly install SQL For Windows on your computer you
- will need to perform the following steps:
-
- 1) Use your favorite editor (NOTEPAD.EXE will suffice) to
- insure that your 'CONFIG.SYS' file has the 'FILES=' MSDOS
- parameter set to at least 30.
-
- 2) Move DBA.EXE, DBA.HLP, QE.EXE, QE.HLP, SQL.DLL SQL.HLP and
- SYNTAX.HLP to the directory in which you keep windows
- programs. This is usually the 'c:\windows' directory.
-
- 3) Make two new directories. One will be for the Quasar
- Database Administrator's files (we recommend naming it
- 'database'), the other will be for your queries and data (we
- recommend naming it 'data'). You can use the MS-DOS 'mkdir'
- command to do this.
-
- 4) Move the *.SQL and *.DAT files to where you want to keep
- your queries. These files contain both sample queries and
- an import file to load some sample data into the database.
- We recommend putting these files in your 'data' directory.
- ____________________
-
- * HyperWare, RR#1 Box 91, Pall Mall, TN 38577; voice: (615) 864-
- 6868; BBS: 8N1 (HST, V.32, V.22bis): (615) 864-6871
- General Information Page 4 of 7
-
-
- 5) Use your favorite editor (NOTEPAD.EXE will suffice) to
- modify the windows initialization file WIN.INI. This file
- can usually be found in the 'c:\windows' directory. Add the
- following lines:
-
- [QuasarDba]
- AutoStart=1
- DatabasePath=c:\database
- DataFilePath=c:\data
- FileNameDatabaseDump=c:\temp\quasar.dmp
-
- [QuasarQe]
- Acknowledge=1
- DataFilePath=c:\data
- OpenNew=1
- UserName=SYSTEM
- UserPassword=QUASAR
- WarnOnClose=1
-
- As DBA.EXE and QE.EXE automatically add some of these lines
- if they do not already exist, be sure you are not adding
- duplicate entries. If you edit WIN.INI before running
- DBA.EXE or QE.EXE you don't have to worry.
-
- These entries have the following meanings:
-
- [QuasarDba] Identifies a block of entries as
- belonging to the Quasar Database
- Administrator.
-
- AutoStart Set to '0' or '1'. When set to '1'
- causes the Quasar Database Administrator
- to automatically start the database as
- soon as you start the program.
-
- DatabasePath Set to the path you want the database
- files to reside in. Make sure to create
- this directory before starting the
- Quasar Database Administrator. We
- recommend naming it 'database'.
-
- DatafilePath Set to the path you want to use as the
- default for import and export
- operations. We recommend naming it
- 'data'.
-
- FileNameDatabaseDump Set to the full file name of the
- file you want the Quasar Database
- Administrator to use for the 'dump'
- operation.
-
- LogPath Set to the path you want the transaction
- journal files to reside in. Make sure
- to create this directory before starting
- General Information Page 5 of 7
-
-
- the Quasar Database Administrator. If
- not specified, DatabasePath is used. We
- recommend letting it default to
- DatabasePath.
-
- [QuasarQe] Identifies a block of entries as
- belonging to the Quasar Query Editor.
-
- Acknowledge Set to '0' or '1'. When set to '1'
- causes the Quasar Query Editor to
- display an informational dialog box
- every time a query completes.
-
- DataFilePath Set to the path you want to use as the
- default for file operations. We
- recommend naming it 'data'.
-
- OpenNew Set to '0' or '1'. When set to '1'
- causes the Quasar Query Editor to
- automatically create a new 'pad' when
- the Query Editor first starts.
-
- UserName Set to 'SYSTEM'. This identifies the
- default user name.
-
- UserPassword Set to 'QUASAR'. This identifies the
- default user password.
-
- WarnOnClose Set to '0' or '1'. When set to '1'
- causes the Quasar Query Editor to prompt
- the user for a file name before closing
- a pad which contains text not yet saved
- to disk.
-
- SQL For Windows also relies upon the international date and
- time settings. The Windows defaults are fine and you can
- leave them alone. If you've changed them, don't worry, time
- stamps are saved in binary and not converted to
- international format until used for output. If you're
- interested, we recommend the following settings:
-
- [intl]
- iDate=0
- iTime=0
- iTLZero=1
- s1159=AM
- s2359=PM
- sDate=/
- sShortDate=MM/dd/yy
- sTime=:
-
- International date and time settings are most easily changed
- via Microsoft's Windows Control Panel. Select the
- "International" icon then click on either "date" or "time".
- General Information Page 6 of 7
-
-
- 6) Use Microsoft's Program Manager to create a new program
- group:
-
- a) select 'File', 'New'
-
- b) select 'Program Group', 'OK'
-
- c) Enter description: 'Quasar', group file: 'QUASAR'
-
- d) select 'OK'
-
- 7) Use Microsoft's Program Manager to create two new program
- items:
-
- a) select 'File', 'New'
-
- b) select Program Item, 'OK'
-
- c) Enter description: 'Dba', command line: 'DBA.EXE'
-
- d) select 'OK'
-
- e) select 'File', 'New'
-
- f) select Program Item, 'OK'
-
- g) Enter description: 'Qe', command line: 'QE.EXE'
-
- h) select 'OK'
-
- 8) Start the Quasar Database Administrator by clicking on the
- 'Dba' Icon in the Microsoft Program Manager. When the
- Quasar Database Administrator complains that it can't find a
- database, click on "OK". Now select 'Toolbox' in the main
- menu. Select the 'Install' entry, this will install the
- database in the directory identified by the 'DatabasePath'
- setting described above.
-
- 9) At this point the database is fully installed. To run some
- sample queries, see the section "Example Queries" below.
-
- 10) If you're not going to use the Quasar SQL Applications
- Programming Interface (API), you may exit ('Exit' is in the
- 'File' menu) the Quasar Database Administrator.
-
- 11) If you intend to use the Quasar SQL API for 'C' program
- development: Move SQL.LIB into some directory where it is
- accessible by your linker (usually c:\windev\lib). Move
- SQL.H to a directory where it is accessible to the compiler
- (usually c:\c\include). You will probably want to read
- SQL.DOC. A sample application program is included as
- EXAMPLEC.*. You ought to compile, link and run it (the
- batch file EXAMPLEC.BAT is included to accomplish this) to
- familiarize yourself with the Quasar SQL API.
- General Information Page 7 of 7
-
-
- 12) If you intend to use the Quasar SQL API for 'Visual Basic'
- program development: A sample application program is
- included. Move EXAMBLEB.* to a directory where you keep
- your 'Visual Basic' programs (usually c:\vb). You ought to
- compile and run EXAMPLEB to familiarize yourself with the
- Quasar SQL API. You will probably want to read SQL.DOC.
-
-
-
- Example Queries
-
-
- You will probably want to run our examples to familiarize
- yourself with the operation of SQL For Windows.
-
- 1) Start the Quasar Database Administrator by clicking on the
- 'Dba' Icon in the Microsoft Program Manager. The database
- ought to start automatically. If you didn't set AutoStart=1
- in the WIN.INI file, when the Quasar Database
- Administrator's window appears select 'Control' from its
- menu. Select the 'Start' entry, this will start the
- database.
-
- 2) Start the Quasar Query Editor by clicking on the 'Qe' icon
- in the Microsoft Program Manager. When the Quasar Query
- Editor's window appears select 'File' from its menu. Now
- select the 'Open' entry and open the file CREATE.SQL. When
- its text appears in a pad select the menu commands
- 'Database', 'Execute' (or hit control/x). This query
- creates the tables of the example database.
-
- 3) Now go to the Quasar Database Administrator and select the
- menu commands 'File', 'Import'. Select the file
- EXAMPLE.DAT. The 'Import' loads the data in EXAMPLE.DAT
- into the tables you created with CREATE.SQL.
-
- 4) You can now execute any of the sample queries. Go to the
- Quasar Query Editor, open a file (for example QUERY01.SQL)
- and execute it. Files which contain select statements will
- cause the Quasar Query Editor to open a new pad and place
- the results as text into the new pad. You may then edit the
- data and/or save it to a file using the 'File', 'Save As'
- commands.
-
- 5) To remove the sample data from the database just execute the
- SQL 'drop table' statements in the DROP.SQL file.
-
- 6) You are now ready to write your own SQL statements and
- create your own database.
-
- Stellar Industries: (714) 861-7885
- 3335 S. Falcon Ridge Road
- Diamond Bar, CA 91765