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.
This error message appears when you try to use a invalid offset or length in a READTEXT statement.
The T-SQL statement can be parsed, but causes the error at runtime.
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.
All versions of SQL Server.
DECLARE @textpointer VARBINARY(16)
SELECT @textpointer = TEXTPTR(pr_info)
READTEXT pub_info.pr_info @textpointer 1 2500
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.