Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » The SQL Anywhere debugger » Tutorial: Getting started with the debugger

 

Lesson 3: Fixing the bug

Fix the bug you identified in the previous lesson by initializing the Top_Value variable.

Prerequisites

This lesson assumes that you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Getting started with the debugger.

This lesson assumes that you have completed all preceding lessons. See Lesson 1: Starting the debugger and finding the bug.

 Task
  1. Click Mode » Design.

  2. In the right pane, locate the following statement:

    OPEN cursor_this_customer;
  3. Type the following line underneath that initializes the Top_Value variable:

    SET top_value = 0;
  4. Click File » Save.

  5. Execute the procedure again and confirm that Interactive SQL displays the correct results.

  6. Close any open Interactive SQL windows.

Results

The bug is fixed and the procedure runs as expected. You have completed the tutorial on debugging.

Next

Delete the directory that contains the copy of the sample database that is used in this tutorial, for example c:\demodb.

 See also