Contents

odbc Sniffer for Windows

The following Help Topics are available:

Introduction

Disclaimer

About Blue Lagoon Software

odbc Sniffer menu commands

odbc Sniffer options dialog box

odbc Sniffer's sniffed data


Introduction

Every application under Windows 3.1 written to access database servers, whether in Microsoft Visual Basic, Microsoft ACCESS, Power Builder, C, or Microsoft Excel does so through some library specific to the tool being used.  These libraries in turn interface with an ODBC client driver.

The version of odbc Sniffer for Windows you have purchased is to be used under Windows 3.1.  The Sniffer allows you to sniff all ODBC API calls simultaneously.

To make the most out of odbc Sniffer for Windows, you should have a copy of The Microsoft ODBC SDK API Reference handy.  This valuable reference lists all of the ODBC API along with the parameters passed and return values.  This information will be needed when examining odbc Sniffer's sniffed data.


Disclaimer

odbc Sniffer for Windows, Copyright © 1992-1994 by Blue Lagoon Software, is provided as-is without warranty of any kind.  Blue Lagoon Software shall not be liable for any loss of profits, loss of use, interruption of business, nor indirect, special, incidental or consequential damages of any kind from the use of this product.


About Blue Lagoon Software

odbc Sniffer for Windows was designed and developed by Blue Lagoon Software.  Blue Lagoon Software is a Windows consulting and product development company with expertise in the following areas:

• Client/Server application development;

Microsoft and Sybase SQL Server

Visual Basic

C and C++

Excel macro language

ODBC

• Multimedia Training systems

Ultimedia

• Windows SDK and DDK development

Experts in user interface design.

Experts in GDI implementation.

Experts in Windows 3.1 architecture.

Blue Lagoon Software

6659 Hesperia Avenue

Reseda, Ca. 91335

Voice:	(818) 807-2785

Fax:	(818) 345-8905

BBS:	(818) 343-8433

CServe:	70152,1601


odbc Sniffer menu commands

odbc Sniffer for Windows has four menus; Sniffer, Windows, Options, and Help.

Sniffer menu commands

Sniffer On/Off

Toggles sniff mode.  When odbc Sniffer is sniffing, the caption bar of the application will be set to "<< odbc Sniffer >>".  When odbc Sniffer is not sniffing, the caption bar of the application will be set to "odbc Sniffer".

Exit

Exits odbc Sniffer.

Window menu commands

Clear Window

Clears the odbc Sniffer application window.  Any output in the odbc Sniffer application window will be cleared.

Options! menu command

Brings up the odbc Sniffer options dialog box .  It is within this dialog box that sniffing options are setup.

Help menu commands

Contents

Brings up the contents portion of the help file.

About

Displays application about box.


odbc Sniffer options dialog box

Programs combo box

The Programs combo box contains a list of all programs currently running under Windows.

To sniff a specific applications ODBC accesses, first make sure that the application is currently running, then select it from this combo box.  odbc Sniffer will only display ODBC calls made by this application.  The "(All)" option is designed to display ODBC calls made by ALL applications.

API list box

The API list box is a multiselection list box.  Individual APIs are selected to indicate that they should be displayed by the Sniffer when they are called.  This allows you to filter out the APIs you're not interested in seeing.

Window check box

This check box should be selected to indicate that you want odbc Sniffer to display what it sniffs in the application area of the odbc Sniffer's application window.

Lines entry field

This entry field must contain a number between 10 and 250.  The number indicates the number of lines of sniffed data that the odbc Sniffer's application window will display at any given time.

File check box

This check box should be selected to indicate that you want odbc Sniffer to create a log file which will contain all sniffed data.  As odbc Sniffer sniffs, it will append its data in ASCII format to a log file whose path name is specified in the adjacent entry field.

OK pushbutton

Accepts the changes made.

Cancel pushbutton

Cancels the changes made.


odbc Sniffer's sniffed data

It is possible to have odbc Sniffer sniff data into both odbc Sniffer's application window and/or a log file in ASCII format.  The application window is subject to a maximum of 250 lines of output while the log file has no imposed limits.

When an ODBC API call is made, the execution time of the call in seconds:milliseconds, the application that made the call, the name of the API along with the parameters and return value are displayed in the application window and/or saved to the log file in the following format:

000:016 MSACCESS: SQLExecDirect(1257177088, "select * from foo", 17), RETVAL=SQL_SUCCESS

Note:  the execution time of the call is the amount time in seconds:milliseconds it took ODBC to execute the call.  So, for example, it took 16 milliseconds to execute the above ODBC call.  This performance information is especially useful for commands such as SQLExecDirect and SQLExecute because they send ODBC commands to database servers for execution.  By measuring their performance, it is possible to determine how long queries and stored procedures take to execute.

According to the ODBC SDK API documentation, SQLExecDirect has three parameters, a handle to the database connection, a long pointer to the SQL command to execute, and the number of characters in the SQL command.  The return value can be any of the values documented.  As we can see, the SQLExecDirect call was made by Microsoft ACCESS, the database handle is 1257177088, and the command being executed is "select * from foo".  The return value is SQL_SUCCESS.