informix
DataBlade Developers Kit User's Guide
Debugging and Testing DataBlade Modules on Windows NT

DBDK Visual C++ Add-In and IfxQuery

The DBDK Visual C++ Add-In is a toolbar that appears in Microsoft Visual C++ after you install DBDK. The add-in aids you in debugging DataBlade modules in the following ways:

The add-in toolbar contains seven buttons. To see the name of each command, position the mouse pointer over the button. Figure 10-1 shows the add-in toolbar.

Figure 10-1
DBDK Visual C++ Add-In

The primary add-in command is the Debug DataBlade Module command; it completes all the tasks necessary to bring your DataBlade module to the first debugging breakpoint. When you use the Debug DataBlade Module command to start debugging, the IfxQuery tool is launched from within Visual C++ when an SQL unit test file is the active window.

The Debug DataBlade Module Command

If you have a DataBlade module project open in Visual C++ and click the Debug DataBlade Module button, the Debug DataBlade Module command performs the following steps:

  1. Checks if the DataBlade module needs to be compiled and compiles it, if necessary.
  2. If necessary, creates a new directory for the DataBlade module under the %INFORMIXDIR%\extend directory.
  3. Installs the DataBlade module dynamic link library and SQL scripts in the %INFORMIXDIR%\extend\project.0 directory.
  4. If necessary, shuts down the database server.
  5. Starts Visual C++ debugger with the database server attached.
  6. Important: The database server typically runs as a Windows NT service; you can start and stop it using the Services dialog box in the Control Panel. However, when the add-in starts the database server attached to the debugger, it does not run as a service and the Services dialog box does not show it running. If you attempt to start or stop the database server using the Services dialog box while it is attached to the debugger, you receive an error.

If the active window when you execute the Debug DataBlade Module command is an SQL file, the Debug DataBlade Module command launches IfxQuery, which performs the following additional tasks:

  1. If necessary, creates the database you specified in the Configure DBDK Visual C++ Add-In dialog box
  2. Connects to the database for the project
  3. Registers the DataBlade module
  4. If necessary, initializes the newly created database using the Setup.sql file
  5. Executes the SQL statements from the active unit test SQL file until the first breakpoint is reached
  6. After you pass the breakpoint, executes the next SQL statement until the next breakpoint is reached
  7. After you pass all breakpoints and the routine returns, writes the results of the SQL statements to an HTML file
  8. Launches the default HTML browser for your computer
  9. Displays the SQL results in the HTML browser
  10. Shuts down

If the active window when you execute the Debug DataBlade Module command is not an SQL file, you can execute SQL queries using another SQL query tool, such as SQL Editor. However, you must first explicitly register the DataBlade module by clicking the add-in Register DataBlade Module button or by using BladeManager (see the DataBlade Module Installation and Registration Guide for instructions). In addition, the database you specified in the Configure DBDK Visual C++ Add-In dialog box must exist.

Other Add-In Commands

The following table lists the other add-in command buttons, in addition to the Debug DataBlade Module command, and the tasks they complete.

Task Button
Copy the project.bld file to the local or remote database server Upload DataBlade Module
Copy the DataBlade module SQL scripts to the local or remote database server Upload DataBlade SQL Scripts
Register the DataBlade module on the local or remote database server Register DataBlade Module
Shut down and restart the local database server Stops and restarts IDS on the local host
Launch the add-in help page, which is part of the DBDK InfoShelf Launch InfoShelf
Change the database server or database for a project Configure DBDK Visual C++ Add-In dialog box

Important: Before you can run the Register DataBlade Module command, you must install the DataBlade module by using the Upload DataBlade Module and Upload DataBlade SQL Scripts commands, and the database you specified in the Configure DBDK Visual C++ Add-In dialog box must exist.


DataBlade Developers Kit User's Guide, Version 4.0
Copyright © 1999, Informix Software, Inc. All rights reserved