PowerBASIC Gazette #20 (English)
PowerBASIC Gazette CyberEdition #20
===================================
RE: SQL Tools version 2.0 Available Today!
August
Fifteenth
2001
From: Bob Zale, President, PowerBASIC, Inc.
To: Valued customer
Dear customer,
More "Breaking News" from the Gazette...
Perfect Sync announces version 2.0 of SQL Tools!
We can have it in your hands this afternoon. It's just that simple.
If you need Database Management in your code, you need SQL Tools 2.
Stick around for a minute, I'll convince you. Of course, if you
already own SQL Tools 1, you're allowed to skip right to the end
and place your upgrade order now! But do come back later and read
the rest of the Gazette?
So
Just What is SQL?
SQL stands for "Structured Query Language". Some folks pronounce it
"Ess-Cue-Ell", and some say "Sequel", but most everyone agrees it's
a very powerful database tool. The syntax of the language resembles
Basic, but it may even be closer to plain natural English. Let's
suppose your instructions were:
"Give me all of the records in my AddressBook database where
the value in the State field is "California", the Age of the
person is greater than 18, and the PhoneNumber field is not
blank. Show me the FirstName, LastName, City, and PhoneNumber
fields, and sort the records in ascending order by ZipCode."
Imagine writing the code to do that procedurally! It wouldn't be
trivial. Do it with SQL in a single statement:
SELECT FirstName, LastName, City, PhoneNumber FROM AddressBook
WHERE State = 'California' AND Age > 18 AND PhoneNumber <> '',
ORDER BY ZipCode
Issue that request, then read the data. It's just that simple. No
worries about file formats, indexes, linked lists, hash tables, or
anything else. Construct a simple string, and the database does
your work for you. Of course, SQL is a complete database language.
You can insert, delete, or update data, search, sort, and select
with equal ease.
SQL Databases are Relational Databases. Suppose you need to store
product orders. Create a SQL table (like a grid) called Orders,
with a CustomerNumber column, a QuantityOrdered Column, and a
ProductNumber column. Then create a table called Customers that
contains a CustomerNumber column, a CustomerName column, and a
CustomerAddress column. Now, create a table called Products, with
columns called ProductNumber, ProductName, and Product Price. The
beauty of a relational database? Each unique value is stored only
once. Even if 10,000 different customers order your your product
"Acme Industries Super-Widget 2000", that string will appear in the
database once. When the text name is needed, the system finds it
automatically. Perhaps even better, when the product name changes
to "Acme Industries Super-Widget 2000 Plus", you change it once
and every record in the database reflects it instantly.
SQL databases are also Multi-User. Twenty clerks can enter orders
at the same time that reports are generated or products redefined.
The bottom line is simply this: SQL becomes a database management
language of its own, encapsulated within PowerBASIC, or even some
other programming language when necessary. A very powerful tool
for your applications!
How
Does SQL Tools Fit in this Picture?
SQL Tools offers a straightforward interface to ODBC, Microsoft's
Open Database Connectivity Engine. ODBC is an integral part of
32-bit Windows, and is automatically installed in all but the
earliest versions. Even then, it's just a free download from the
Microsoft Web Site. SQL Tools, and the simple language shown
above, will work for virtually any database compatible with ODBC.
Microsoft Access, SQL Server, Oracle, Btrieve, dBase, Paradox,
Excel, FoxPro, and more... In fact, ODBC drivers are available
for more than 50 popular databases, and toolkits are available for
writing custom drivers. SQL Tools provides compatibility with the
ODBC Version 3.5, Level 2 specification, which is the current state
of the art for ODBC databases. Complete ODBC 3.5 support means
you can read and write .MDB files without using Microsoft Access...
You can read and write .DBF files without using FoxPro or dBase...
You don't have to use any DBMS software! The bottom line is that
SQL Tools provides very fast, very efficient, access to almost any
popular database files in the PowerBASIC tradition - WITH NO BLOAT!
What
Does a SQL Tools Program Look Like?
Here's the PowerBASIC source for a simple program that opens a
database, retrieves all of the data from a table, and saves it to
a text file:
FUNCTION PBMain
OPEN "\SQL-DUMP.TXT" FOR OUTPUT AS #1
SQL_OpenDatabase "DSN=SYS1; UID=JOHN; PWD=;"
SQL_Statement %IMMEDIATE, "SELECT * FROM
ADDRESSBOOK"
DO
SQL_Fetch %NEXT_ROW
IF SQL_EndOfData THEN EXIT LOOP
PRINT
#1,SQL_ResultColumnText(%ALL_COLs)
LOOP
CLOSE #1
END FUNCTION
Database doesn't get much easier, does it? A fully functional
SQL Tools program in that very small space! Don't be fooled
by the simplicity, though... SQL Tools provides everything
you'll need to build powerful, flexible, multi-user programs.
What's the Difference Between Standard and Pro?
SQL Tools Standard contains all of the functions you'll need to
create programs which read and modify SQL databases. The entire
text-based, single-statement SQL language is supported. SQL Tools
imposes no limitations on the SQL syntax supported by your ODBC
drivers. And of course, subject to the license agreement, you
can distribute either SQL Tools DLL with no additional cost or
royalty expense.
SQL Tools Standard allows a program to have one or two databases
open at the same time, and each database can use one or two SQL
statements at a time.
SQL Tools Pro supports up to 256 databases by one program, each
having up to 256 concurrent SQL statements. You also get...
* Manual Commit/Rollback of Transactions
* Stored Procedures (pre-compiled SQL statements)
* Batched SQL Statements
* Bound Statement Parameters, with Long values and arrays
* Relative Fetches
* Bookmarks
* Support for MultiRow (Block) Cursors
* Bulk Operations
* Positioned Operations
* Named Cursors
* Connection Pooling
* Multithreaded Operation
* Low level SQL/ODBC Diagnostics
* Extended Info Functions...
What
Will I Need To Use SQL Tools?
You'll need a Microsoft 32-bit Windows operating system, like Win95,
Win98, WinNT, or Win2000, a 32-bit Windows Compiler (like PowerBASIC
Console Compiler or PB/DLL), and the ODBC Driver for the database
you want to use. Free ODBC drivers for many popular databases can
be downloaded from the Microsoft web site.
If you want to design a complex relational database (as opposed to
working with an existing database) you may wish to consider getting
a GUI-based "DBMS" database management software, such as Microsoft
Access or Oracle SQL*Plus. Of course, if you distribute a program,
you only need to distribute the ODBC driver, never a DBMS package.
What's
Included With SQL Tools?
You'll get SQL Tools with royalty-free distribution rights (but see
the Software License Agreement for details), the SQL Demo DLL, and
the huge SQL Tools Help File. You'll get all the $INCLUDE files
that you'll need, and even sample programs with a database.
SQL Tools Documentation is provided in Windows Help File Format, and
it offers a lot. More than 800 pages, filled with function examples,
tips and techniques, with many Windows, ODBC and SQL related topics.
It's also available in Adobe PDF format to allow easy printing,
searching, and annotation. Licensed users need only request it from
Perfect Sync Support.
So
just what's new in Version 2?
** Compatibility with PowerBASIC, Visual Basic, C, C++, Delphi, or
any other language that can access standard DLLs. Declaration and
header files are currently provided for PB and VB. Others are in
development by support@perfectsync.com
** Enhanced speed and memory efficiency for a number of common
operations, like connecting to a previously-opened database.
You get it... FASTER/SMALLER, FASTER/SMALLER, like PowerBASIC!
** Version 2 is 99%+ code-compatible with Version 1 programs. Needs
just a few simple changes (a checklist is provided) and recompile!
** The Version 2 License Agreement does not restrict the use of SQL
Tools in free, demo, and shareware projects though this does not
affect programs using Version 1. The new, relaxed rules apply only
to programs which use SQL Tools Version 2.
** Greatly improved handling of Dates, Times, and Date-Time columns.
The existing SQL_ResColText and SQL_ResultColumnText functions now
return dates and times in much more usable formats, and you can
readily change the default formats.
** SQL_ResColDateTime and SQL_ResultColumnDateTime functions have
been added for access and formatting of Date-Time columns.
** SQL_ResColDate, SQL_ResColTime, SQL_ResultColumnDate, and
SQL_ResultColumnTime are added to specify the date and/or time
format returned on a column-by-column basis, using standard Win32
masks like hh:mm:ss and dddd, MMM dd, yyyy.
** Automatic handling of all three Unicode Data Types. SQL Tools
is compatible with ODBC Version 3.5, Level 2, which is the current
state of the art for ODBC databases.
** The SQL Tools documentation has been thoroughly updated and
revised, including new sections that cover questions most often
heard by Tech Support. More than 800 pages of Help File!
** SQL Tools Pro Only: New functions SQL_ResColDateTimePart and
SQL_ResultColumnDateTimePart to obtain numeric values which
correspond to part of a Date, Time, or DateTime column, including
the Years, Month, Day, Day Of Week, Hour, Minute, Second, and
Nanosecond. More? SQL_DataSourceAdd, SQL_DataSourceAdmin, and
SQL_DataSourceModify let you manage Data Sources more effectively.
When used with an Access database, SQL_DataSourceModify can also
be used to compact, repair and even create all new databases.
** SQL Tools Pro now tracks the current row number of each SELECT
statement, retrieve it with SQL_FetchPos and SQL_FetchPosition.
There's more, too, so just check it all out at www.powerbasic.com
So
how do I buy SQL Tools today?
That's the easy part! SQL Tools Standard is priced at just $99.95,
while the Pro Version is $199.95. So please don't delay...
Call us today at (800)780-7707 or (831)659-8000, fax an order to
(831)659-8008. Place an e/order on the web (www.powerbasic.com),
or even mail it in. We're ready to deliver SQL Tools this afternoon!
Of course, if you already own version 1, you qualify for special
upgrade pricing, too. In fact, if it's under 30 days, your upgrade
is free! SQL Tools Pro owners upgrade to version 2 for $99.95. SQL
Tools Standard owners can upgrade for $64.95, and for a limited time
you can upgrade Standard to Pro for just $139.95!
So don't wait... call, fax, or email us now. You could be using SQL
Tools this very afternoon with just a quick download on the web!
Technical Support for SQL Tools is provided only by Perfect Sync Inc.
====================================================================
PowerBASIC
Price List
====================================================================
PowerBASIC Compiler v3.5 for DOS
$99.00
Add PB 3.5 Printed Documentation
$29.00
PB/CC Console Compiler 2.0 - Full Product
$159.00
Add PB/CC Printed Documentation
29.00
PB/DLL 32/16 GUI Compiler 6.0 - Full Product
189.00
Add PB/DLL Printed Documentation
29.00
PowerGEN Visual Designer for PB/DLL
$39.00
PowerTree BTree Manager for Windows (Win16/32)
$129.00
PowerTree Index Manager for DOS
$89.00
QuickPak Professional for DOS
$129.00
PB/Vision for DOS
$20.00
"Learning Basic" Book for DOS
$39.95
PB/Xtra III for DOS and Windows
$49.00
====================================================================
PerfectSync Graphics Tools (Requires CT with PB/CC)
$ 49.95
PerfectSync Console Tools Standard Version
49.95
PerfectSync Console Tools Professional Version
99.95
PerfectSync SQL Tools Standard Version
99.95
PerfectSync SQL Tools Professional Version
199.95
PerfectSync SQL Tools Standard Upgrade
64.95
PerfectSync SQL Tools Professional Upgrade
99.95
PerfectSync SQL Tools Standard to Pro Upgrade
139.95
PerfectSync DOS Box
35.00
====================================================================
Shipping/Handling for above:
Software
Software+book Addl Books
Email
$6
N/A
N/A
Std: US/Can/Mex $6
$6
$6
Fedex US 2-day $12
$12
$6
Fedex US 1-day $22
$22
$6
Air Mail Intl $12
$22
$6
Fedex Intl $28
$38
$8
International Air Mail is $28 for DOS products with books, Fedex
is $38. Fedex International Rates are for Western Europe, Pacific
Rim, Asia, and North America. Others please request a quotation.
====================================================================
Order online at www.powerbasic.com/shop/
or just send an email
with all pertinent information to sales@powerbasic.com
We'll take it from there!
====================================================================
Most PowerBASIC products (those without printed books) can now be
delivered by electronic mail. No wait for a package to arrive...
No high shipping costs... For just $6 per order, no matter how
many products, we'll deliver directly to your computer. If you're
outside the U.S., savings might be greater. You won't pay taxes or
duties to a freight company or postal service, because they aren't
involved in the delivery. Check your tax code to be sure, but some
countries charge no tax at all on transactions of this type. It
could just be your lucky day!
====================================================================
PowerBASIC, Inc.
(800)
780-7707 Sales
316 Mid Valley Center
(831)
659-8000 Voice
Carmel, CA 93923
(831)
659-8008 Fax
====================================================================
Is your PowerBASIC Gazette Electronic Edition subscription coming to
you at home or work? If you don't want to miss a single issue, why
not subscribe from both email addresses?
Send your subscription request to email@powerbasic.com
and please
include your name and all email addresses you'd like to add as well
as your Zip or Postal Code.
Did you know that there is also a paper edition of the PowerBASIC
Gazette? That's right, you can get a newsletter with articles
detailing all of the products available from PowerBASIC, Inc. Full
of useful code tidbits, book reviews and more. Why not get your
free subscription today? Just send your name and postal address to
sales@powerbasic.com
If you know someone else who would enjoy this newsletter please
forward a copy to them so they can subscribe.
====================================================================
All contents Copyright (c) 2001 by PowerBASIC, Inc. All Rights
Reserved. PowerBASIC is a registered trademark of PowerBASIC, Inc,
while PB/CC, PB/DLL, PowerGEN, and PowerTREE are trademarks of
PowerBASIC, Inc. All other brand names are trademarks or registered
trademarks of their respective owners.
====================================================================
PowerBASIC
Gazette - Electronic Edition
Volume
1 - Issue 20
PowerBASIC, Inc.
(800)
780-7707 Sales
316 Mid Valley Center
(831)
659-8000 Voice
Carmel, CA 93923
(831)
659-8008 Fax
Visit us on the World Wide Web at www.powerbasic.com
Email Sales: sales@powerbasic.com
This newsletter is only sent to email addresses in our subscription
list. If you have received this newsletter by mistake or no longer
wish to receive it, please send a simple unsubscribe request to
support@powerbasic.com with your name and
zip/postal code.
This newsletter is best viewed with a fixed-width font.
====================================================================
|