FIX: Changes Lost When Changing Variable During Debugging (157903)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
This article was previously published under Q157903 SYMPTOMS
When you debug a SQL Server-stored procedure, if you change a variable or
parameter to a value that is longer than the declared size of the variable
or parameter, your changes will be lost without warning in the next step of
the debugger.
CAUSE
Developer Studio accumulates all changes made to variables and parameters
and then ships them across to SQL Server when the user moves to the next
step. SQL Server may either accept or reject the changes. In this case, it
rejects because of buffer overflow. MSDEV shows the valid values of the
variables in the next step and ignores the invalid assignment that the user
specified.
RESOLUTION
SQL Server will only accept changes that satisfy the declaration of the
variable or parameter. MSDEV does not impose this limitation on values
entered in the debugger. Therefore, just because the MSDEV accepted a value
for a variable or parameter, do not conclude that that value will
necessarily be the one that is used thereafter in the execution of the
stored procedure. The deciding factor is whether SQL Server accepts the new
value.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug was corrected in Visual C++,
Enterprise Edition, version 5.0.
Modification Type: | Major | Last Reviewed: | 10/15/2002 |
---|
Keywords: | kbBug kbDebug kbEEdition kbide kbSQLProg kbVC500fix KB157903 |
---|
|