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



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q273009
BUG #: 58026 (SQLBUG_70)

SYMPTOMS

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'
				

WORKAROUND

Use the SQL Server Enterprise Manager to manage and edit stored procedures, triggers and views.

STATUS

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.

MORE INFORMATION

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.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbBug kbCodeSnippet kbfix kbQFE KB273009