.

How Comprehensive is the SQL Tools Documentation?

This is the Table of Contents from the current version of the SQL Tools Help File.  The "links" here aren't clickable, as they are in the actual Help File, we just wanted to give you an idea of the many topics that are covered.

Don't worry... You don't have to read all of this material in order to begin using SQL Tools!  But when you need help with advanced topics, it's all there!


SQL TOOLS

© 1999-2001 Perfect Sync, Inc.
All Rights Reserved

Copyright and Trademark Information
License Agreement and Runtime File Distribution Rights
SQL Tools Authorization Codes

Troubleshooting Your Programs
Getting Technical Help

USER'S GUIDE

Frequently Asked Questions
        What SQL Tools IS and ISN'T
        What's the Difference Between SQL Tools Standard and Pro?
        What Will SQL Tools Do For My Programs?
        What Will I Need To Use SQL Tools?
        What's the Difference Between SQL and ODBC?
        Can I Use SQL Tools to Write "Universal" Programs?
        Do All SQL Tools Features Work With All Databases?
        How Complete is SQL Tools?
        Exactly Which ODBC Features are Not Supported?

Ready to Write Programs? Start Here!

Conventions Used In This Document
        Variable Naming Conventions
        Signed and Unsigned Integers

Installing SQL Tools

Installing ODBC Drivers
        Installing ODBC Drivers from the Microsoft Internet Site
        Installing ODBC Drivers from a Database Product

Terminology Differences

Compliance Issues

Two Of Everything: The "Abbreviated" and "Verbose" Functions
Four of Many Things
Eight or More of Some Things

The Abbreviations

Four Critical Steps For Every SQL Tools Program
Special Considerations for DLL Programmers

A SQL Tools Primer

What a Database Is
SQL and ODBC

ODBC Drivers, and the Driver Manager
SQL Tools and ODBC Drivers

Opening a Database
        Using a DSN File to Open a Database
        Using a Connection String to Open a Database
        Manual Navigation: Using the SQL_OpenDB Function to Create a DSN File
        Error Messages After Opening a Database

Determining Database Capabilities

Tables, Rows, Columns, and Cells

Table Metadata

SQL Data Types
        SQL_CHAR
        SQL_VARCHAR
        SQL_LONGVARCHAR
        SQL_INTEGER
        SQL_SMALLINT
        SQL_TINYINT
        SQL_BIT
        SQL_BIGINT
        SQL_REAL
        SQL_DOUBLE
        SQL_FLOAT
        SQL_NUMERIC and SQL_DECIMAL
        SQL_TIMESTAMP
        SQL_DATE
        SQL_TIME
        SQL_INTERVAL Data Types
        SQL_BINARY, SQL_VARBINARY, and SQL_LONGVARBINARY
        Lengths of SQL_CHAR and SQL_BINARY Data Types
        SQL_DEFAULT
        Datasource-Dependent Data Types
        Unicode Data Types
                SQL_wCHAR
                SQL_wVARCHAR
                SQL_wLONGVARCHAR

SQL Data Type "Properties"
        Concise Type
        Buffer Size
        Transfer Octet Length
        Num Prec Radix
        Display Size
        Decimal Digits

BASIC Data Types

SQL Statements

Execution of SQL Statements
Asynchronous Execution of SQL Statements

SQL Statement Mode

Binding Statement Input Parameters
        Binding Numeric Parameters
        Setting a Bound Parameter to the Null Value
        Binding Fixed-Length String/Binary Parameters
        Binding Dynamic String/Binary Parameters
        Binding Long Parameter Values
        Arrays of Bound Parameters

Result Sets

Result Column Binding (Basic)

Fetching Rows from Result Sets (Basic)

Cursors
        Forward-Only Cursors
        Scrollable Cursors
        Problems with Scrollable Cursors

Fetching Rows from Result Sets (Advanced)

Determining Cursor Capabilities

Using Bookmarks
        Binding Column Zero

Relative Fetches

Result Column Binding (Advanced)
        AutoBinding
        Other Binding Alternatives
        Proxy Binding
        Manual Binding and Direct Binding
        Direct Binding
        Manual Binding
        Row-Wise Binding

Accessing Result Columns

Long Columns
        "Data Truncated" Error Messages
        Possible Driver Restrictions on Long Columns

Result Column Indicators
        Null Values
        Other Uses of Column Indicators

Results from non-SELECT Statements
        Why You CAN'T Use SQL_ResRowCount for SELECT Statements

Detecting the End Of Data

Detecting "No Data At All"

Error Handling in SQL Tools Programs
        Error Codes
        Using Error Messages Instead of Error Codes
        Ignoring Predictable Errors
        Miscellaneous Error Handling Techniques
        SQL Tools Trace Mode
        ODBC API Tracing

SQL Tools Utility Functions

Database Information and Attributes
Statement Information and Attributes
Environment Attributes

Manually Opening and Closing Databases
Manually Opening and Closing Statements

Using Database Numbers and Statement Numbers
        Statement Zero Operation

Cached Information

Indexes

AutoColumns

Unique Columns and Primary Columns

Foreign Keys

Table Privileges and Column Privileges

Committing Transactions Manually

Stored Procedures

MultiRow Cursors

Named Cursors

Bulk Operations
        Using BULK_UPDATE
        Using BULK_ADD
        Using BULK_FETCH
        Using BULK_DELETE

Positioned Updates and Deletes

Using Long Values with Bulk and Positioned Operations

"Cleaning Up" After a Bulk Operation

Using SQL Tools with a Grid

Multi-Threaded Programs

SQL Handles

Jump to USER'S GUIDE
Jump to APPENDICES
Jump to SAMPLE PROGRAMS

 

REFERENCE GUIDE

Jump to ALPHABETICAL FUNCTION LIST

Reference Guide Format

Functional Families
        Configuration Family
        Environment Family
        Use Family
        Database Open/Close Family
        Database Info/Attrib Family
        Table Info Family
        Table Column Info Family
        Statement Open/Close Family
        Statement Family
        Statement Info/Attrib Family
        Statement Binding Family
        Stored Procedure Family
        Result Column Binding Family
        Result Count Family
        Result Column Family
        Error/Trace Family
        Utility Family
        Get Info Family
        Handle Family

Alphabetical List of SQL Tools Functions

A  B  C  D  E  F  G  H  I  L  M  N  O  P  R  S  T  U

A

        SQL_AsyncErrors
        SQL_AsyncStatement
        SQL_AsyncStatus
        SQL_AsyncStmt
        SQL_Authorize
        SQL_AutoBindCol
        SQL_AutoBindColumn
        SQL_AutoColCount
        SQL_AutoColInfoSInt
        SQL_AutoColInfoStr
        SQL_AutoColumnCount
        SQL_AutoColumnInfoSInt
        SQL_AutoColumnInfoStr
       
B

        SQL_BinaryStr
        SQL_BindParam
        SQL_BindParameter
        SQL_Bkmk
        SQL_Bookmark
        SQL_BulkOp
        SQL_BulkOperation
       
C

        SQL_CloseDatabase
        SQL_CloseDB
        SQL_CloseStatement
        SQL_CloseStmt
        SQL_ColPrivCount
        SQL_ColPrivInfoStr
        SQL_ColumnPrivilegeCount
        SQL_ColumnPrivilegeInfoStr
        SQL_CurName
        SQL_CurrentDB
        SQL_CurrentStmt
        SQL_CursorName

D

        SQL_DatabaseAttribStr
        SQL_DatabaseAttribUInt
        SQL_DatabaseAutoCommit
        SQL_DatabaseDataTypeCount
        SQL_DatabaseDataTypeInfoSInt
        SQL_DatabaseDataTypeInfoStr
        SQL_DatabaseDataTypeNumber
        SQL_DatabaseInfoStr
        SQL_DatabaseInfoUInt
        SQL_DatabaseIsOpen
        SQL_DataSourceAdd
        SQL_DataSourceAdmin
        SQL_DataSourceCount
        SQL_DataSourceInfoStr
        SQL_DataSourceModify
        SQL_DataSourceNumber
        SQL_DBAttribStr
        SQL_DBAttribUInt
        SQL_DBAutoCommit
        SQL_DBDataTypeCount
        SQL_DBDataTypeInfoSInt
        SQL_DBDataTypeInfoStr
        SQL_DBDataTypeNumber
        SQL_DBInfoStr
        SQL_DBInfoUInt
        SQL_DBIsOpen
        SQL_Diagnostic
        SQL_DirectBindCol
        SQL_DirectBindColumn
        SQL_DriverCount
        SQL_DriverInfoStr
        SQL_DriverNumber

E

        SQL_EndOfData
        SQL_EndTrans
        SQL_EndTransaction
        SQL_EnvironAttribSInt
        SQL_EOD
        SQL_ErrorClearAll
        SQL_ErrorClearOne
        SQL_ErrorColumnNumber
        SQL_ErrorCount
        SQL_ErrorDatabaseNumber
        SQL_ErrorFuncName
        SQL_ErrorFunction
        SQL_ErrorIgnore
        SQL_ErrorNativeCode
        SQL_ErrorNumber
        SQL_ErrorPending
        SQL_ErrorQuickAll
        SQL_ErrorQuickOne
        SQL_ErrorSimulate
        SQL_ErrorStatementNumber
        SQL_ErrorStr
        SQL_ErrorText
        SQL_ErrorTime

F

        SQL_Fetch
        SQL_FetchPos
        SQL_FetchPosition
        SQL_FetchRel
        SQL_FetchRelative
        SQL_FetchResult
        SQL_ForeignKeyCount
        SQL_ForeignKeyInfoSInt
        SQL_ForeignKeyInfoStr
        SQL_FornKeyCount
        SQL_FornKeyInfoSInt
        SQL_FornKeyInfoStr
        SQL_FuncAvail
        SQL_FunctionAvailable
       
G

        SQL_GetAutoCols
        SQL_GetAutoColumns
        SQL_GetColPrivs
        SQL_GetColumnPrivileges
        SQL_GetDatabaseDataTypes
        SQL_GetDataSources
        SQL_GetDBDataTypes
        SQL_GetDrivers
        SQL_GetForeignKeys
        SQL_GetFornKeys
        SQL_GetIndexes
        SQL_GetIndxes
        SQL_GetPrimaryKeys
        SQL_GetPrimKeys
        SQL_GetProcCols
        SQL_GetProcedureColumns
        SQL_GetProcedures
        SQL_GetProcs
        SQL_GetTableColumns
        SQL_GetTableInfo
        SQL_GetTablePrivileges
        SQL_GetTblCols
        SQL_GetTblInfo
        SQL_GetTblPrivs
        SQL_GetUniqCols
        SQL_GetUniqueColumns

H

        SQL_hDatabase
        SQL_hDB
        SQL_hEnvironment
        SQL_hParentWindow
        SQL_hStatement
        SQL_hStmt

I

        SQL_IndexCount
        SQL_IndexInfoSInt
        SQL_IndexInfoStr
        SQL_IndxCount
        SQL_IndxInfoSInt
        SQL_IndxInfoStr
        SQL_InfoExport
        SQL_InfoImport
        SQL_Init
        SQL_Initialize
        SQL_IString

L

        SQL_LimitTextLength
        SQL_LongParam
        SQL_LongParameter
        SQL_LongResCol
        SQL_LongResultColumn
       
M

        SQL_ManualBindCol
        SQL_ManualBindColumn
        SQL_MoreRes
        SQL_MoreResults
        SQL_MsgBox
        SQL_MsgBoxButton

N

        SQL_NameCur
        SQL_NameCursor
        SQL_NewDBNumber and SQL_NewDatabaseNumber
        SQL_NewStatementNumber
        SQL_NewStmtNumber
        SQL_NextParam
        SQL_NextParameter

O

        SQL_Okay
        SQL_OnErrorCall
        SQL_OpenDatabase
        SQL_OpenDatabase1
        SQL_OpenDatabase2
        SQL_OpenDB
        SQL_OpenStatement
        SQL_OpenStmt
        SQL_OptionResetAll
        SQL_OptionSInt
        SQL_OptionStr

P

        SQL_ParameterInfoUInt
        SQL_ParamInfoUInt
        SQL_PrimaryKeyCount
        SQL_PrimaryKeyInfoSInt
        SQL_PrimaryKeyInfoStr
        SQL_PrimKeyCount
        SQL_PrimKeyInfoSInt
        SQL_PrimKeyInfoStr
        SQL_ProcColCount
        SQL_ProcColInfoSInt
        SQL_ProcColInfoStr
        SQL_ProcCount
        SQL_ProcedureColumnCount
        SQL_ProcedureColumnInfoSInt
        SQL_ProcedureColumnInfoStr
        SQL_ProcedureCount
        SQL_ProcedureInfoSInt
        SQL_ProcedureInfoStr
        SQL_ProcInfoSInt
        SQL_ProcInfoStr

R

        SQL_ResColBInt
        SQL_ResColBufferPtr
        SQL_ResColCount
        SQL_ResColDate
        SQL_ResColDateTime
        SQL_ResColDateTimePart
        SQL_ResColFloat
        SQL_ResColInd
        SQL_ResColIndPtr
        SQL_ResColInfoSInt
        SQL_ResColInfoStr
        SQL_ResColLen
        SQL_ResColMore
        SQL_ResColNull
        SQL_ResColNumber
        SQL_ResColSInt
        SQL_ResColSize
        SQL_ResColStr
        SQL_ResColText
        SQL_ResColTime
        SQL_ResColType
        SQL_ResColUInt
        SQL_ResetStatementMode
        SQL_ResetStmtMode
        SQL_ResRowCount
        SQL_ResultColumnBInt
        SQL_ResultColumnBufferPtr
        SQL_ResultColumnCount
        SQL_ResultColumnDate
        SQL_ResultColumnDateTime
        SQL_ResultColumnDateTimePart
        SQL_ResultColumnFloat
        SQL_ResultColumnInd
        SQL_ResultColumnIndPtr
        SQL_ResultColumnInfoSInt
        SQL_ResultColumnInfoStr
        SQL_ResultColumnLen
        SQL_ResultColumnMore
        SQL_ResultColumnNull
        SQL_ResultColumnNumber
        SQL_ResultColumnSInt
        SQL_ResultColumnSize
        SQL_ResultColumnStr
        SQL_ResultColumnText
        SQL_ResultColumnTime
        SQL_ResultColumnType
        SQL_ResultColumnUInt
        SQL_ResultRowCount

S

        SQL_SelectFile
        SQL_SetDatabaseAttribStr
        SQL_SetDatabaseAttribUInt
        SQL_SetDBAttribStr
        SQL_SetDBAttribUInt
        SQL_SetEnvironAttribSInt
        SQL_SetOptionSInt
        SQL_SetOptionStr
        SQL_SetPos
        SQL_SetPosition
        SQL_SetStatementAttrib
        SQL_SetStmtAttrib
        SQL_Shutdown
        SQL_State
        SQL_Statement
        SQL_StatementAttrib
        SQL_StatementCancel
        SQL_StatementInfoStr
        SQL_StatementIsOpen
        SQL_StatementMode
        SQL_StatementNativeSyntax
        SQL_StatementParameterCount
        SQL_Stmt
        SQL_StmtAttrib
        SQL_StmtCancel
        SQL_StmtInfoStr
        SQL_StmtIsOpen
        SQL_StmtMode
        SQL_StmtNativeSyntax
        SQL_StmtParamCount
        SQL_StringToType
        SQL_SyncFetchPos
        SQL_SyncFetchPosition

T

        SQL_TableColumnCount
        SQL_TableColumnInfoSInt
        SQL_TableColumnInfoStr
        SQL_TableColumnNumber
        SQL_TableCount
        SQL_TableInfoSInt
        SQL_TableInfoStr
        SQL_TableNumber
        SQL_TablePrivilegeCount
        SQL_TablePrivilegeInfoStr
        SQL_TableStatisticSInt
        SQL_TblColCount
        SQL_TblColInfoSInt
        SQL_TblColInfoStr
        SQL_TblColNumber
        SQL_TblCount
        SQL_TblInfoSInt
        SQL_TblInfoStr
        SQL_TblNumber
        SQL_TblPrivCount
        SQL_TblPrivInfoStr
        SQL_TblStatSInt
        SQL_TextDate
        SQL_TextDateTime
        SQL_TextStr and SQL_TextStrOLE
        SQL_TextTime
        SQL_Thread
        SQL_ToolsVersion
        SQL_Trace
        SQL_TraceSInt
        SQL_TraceStr and SQL_TraceStrOLE
       
U

        SQL_UnbindCol
        SQL_UnbindColumn
        SQL_UniqColCount
        SQL_UniqColInfoSInt
        SQL_UniqColInfoStr
        SQL_UniqueColumnCount
        SQL_UniqueColumnInfoSInt
        SQL_UniqueColumnInfoStr
        SQL_UseDB
        SQL_UseDBStmt
        SQL_UseStmt

Jump to USER'S GUIDE
Jump to REFERENCE GUIDE
Jump to SAMPLE PROGRAMS

APPENDICES

Appendix A: SQL Statement Syntax
        Basic SQL Syntax Rules
        CREATE TABLE
        DROP TABLE
        INSERT INTO
        DELETE FROM
        UPDATE
        SELECT
        CALL

Appendix B: ODBC Reserved Words

Appendix C: ODBC Scalar And Aggregate (Set) Functions
        ODBC Aggregate Functions
        ODBC String Functions
        ODBC Numeric Functions
        ODBC Time/Date/Interval Functions
        ODBC System Functions
        Explicit Data Type Conversion

Appendix D: SQL Tools Error Codes

Appendix E: ODBC Error Codes

Appendix F: SQL States (ODBC Error Messages)

Appendix G: Connection String Syntax

Appendix H: Logical True And False

Appendix I: Internet Resources

Appendix J: Using Bitmasked Values

Appendix K: SQLSetEnvAttr

Appendix L: Upgrading From SQL Tools Version 1 to Version 2

Appendix M: Using SQL_Test.EXE

Appendix Z: Topics Not Covered


Jump to USER'S GUIDE
Jump to REFERENCE GUIDE
Jump to APPENDICES

Sample Programs

        A Simple Program, Step By Step

        Quick and Dirty: The SQL-DUMP Program

       
For Visual Basic Programmers

                SQL-DUMP Step 1: Link SQL Tools to Your Program
                SQL-DUMP Step 2: Open the Database
                SQL-DUMP Step 3: Tell the Database Which Data We Want
                SQL-DUMP Step 4: Retrieve the Data
                SQL-DUMP Step 5: Detect the End of the Data
                SQL-DUMP Step 6: Use the Data
                SQL-DUMP Step 7: Compile and Run
                SQL-DUMP Step 8: Add Error Checking

                For additional sample programs for Visual Basic, see the \SQLTOOLS\SAMPLES\VB directory.

        For PowerBASIC Programmers

                The PowerBASIC Version of SQL-Dump
                SQL-DUMP Step 1: Link SQL Tools to Your Program
                SQL-DUMP Step 2: Open the Database
                SQL-DUMP Step 3: Tell the Database Which Data We Want
                SQL-DUMP Step 4: Retrieve the Data
                SQL-DUMP Step 5: Detect the End of the Data
                SQL-DUMP Step 6: Use the Data
                SQL-DUMP Step 7: Compile and Run
                SQL-DUMP Step 8: Add Error Checking

                For additional sample programs for PowerBASIC, see the \SQLTOOLS\SAMPLES\PB directory.

Top Of Table Of Contents

PowerBASIC, Inc. is an Authorized Reseller of Perfect Sync Software Development Tools.
Copyright © 1999-2001, Perfect Sync, Inc. All Rights Reserved
Used with permission.

. .