FIX: sp_helptext May Fail to Return the Correct Text when a New Line Begins at Multiples of 8000 Bytes

This article was previously published under Q273009
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 58026 (SQLBUG_70)
If a new line in a stored procedure, trigger or view starts on a multiple of 8000 bytes (4000 bytes for non-Unicode text), the sp_helptext stored procedure truncates the first character of that new line.

For example if the new line is:
UPDATE pubs.dbo.authors SET city = 'Seattle'				
The text returned by sp_helptext is:
PDATE pubs.dbo.authors SET city = 'Seattle'				
Use the SQL Server Enterprise Manager to manage and edit stored procedures, triggers and views.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.
If you use the text returned by the sp_helptext stored procedure to re-create or modify the object, syntax or missing object errors might occur when you re-create the object, when you modify the object, or when you run the stored procedure.

This problem occurs with the stored procedure editor in Microsoft Visual InterDev.
truncate missing

Article ID: 273009 - Last Review: 10/21/2013 01:16:33 - Revision: 2.0

Microsoft SQL Server 7.0 Standard Edition

  • kbnosurvey kbarchive kbbug kbfix kbqfe kbcodesnippet KB273009