The offset and length specified in the READTEXT statement is greater than the actual data length of %ld.

Error Message:
Msg 7124, Level 16, State 1, Line 5
The offset and length specified in the READTEXT statement is greater than the actual data length of %ld.

Severity level:
16.

Description:
This error message appears when you try to use a invalid offset or length in a READTEXT statement.

Consequences:
The T-SQL statement can be parsed, but causes the error at runtime.

Resolution:
Errors of the Severity Level 16 are generated by the user and can be fixed by the SQL Server user. The statement cannot be executed this way. Both offset and length must be of valid values less than the actual data length.

Versions:
All versions of SQL Server.

Example(s):
USE pubs
DECLARE @textpointer VARBINARY(16)
SELECT @textpointer = TEXTPTR(pr_info)
  FROM pub_info
READTEXT pub_info.pr_info @textpointer 1 2500

Remarks:
In the above example we try to use use the READTEXT command with the invalid length specification of 2500. Because this value exceeeds the actual length the error is raised.

]]>

Leave a comment

Your email address will not be published.