Debugging the AddInts() function

About this task

To debug the AddInts() function:

Procedure

  1. With AddInts.sql as the active window in Visual C++, click the Debug DataBlade Module button on the add-in toolbar.
    To see the tooltip for a button, place the cursor over it.
  2. If the Executable For Debug Session dialog box prompts you for an executable file, type or use the Browse button to select %INFORMIXDIR%\bin\oninit.exe, where %INFORMIXDIR% is the environment variable that represents the root directory of your HCL Informix® server installation.
  3. Click OK.
  4. When a dialog box appears warning that oninit.exe does not have debugging information, click OK.
  5. When the debugger stops at the breakpoint, choose Debug > Go.

Results

IfxQuery displays the results of the SQL query in your default HTML browser.

The Debug DataBlade Module command performs the following tasks:
  1. Checks if the AddInts DataBlade® module is compiled.
  2. Creates the AddInts.0 directory under the %INFORMIXDIR%\extend directory of the database server.
  3. Installs the AddInts.bld dynamic link library and the AddInts SQL scripts in the %INFORMIXDIR%\extend\AddInts.0 directory.
  4. Starts the Visual C++ debugger and the database server attached to the Visual C++ debugger.
  5. Launches IfxQuery, which creates and connects to the addints_test database, registers the AddInts DataBlade module, and executes the SQL statement from the AddInts.sql file until the breakpoint is reached.
  6. When you pass the breakpoint and the function returns, IfxQuery writes the results of the SQL statements to the AddInts.dital HTML file and launches your default HTML browser to display the results.

If you set no breakpoints, IfxQuery executes all SQL statements in the active window and displays the results.