This article was previously published under Q217102
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 18594 (SQLBUG_65)
After applying SQL Server 6.5 Service Pack 5 or 5a, a user other than System Administrator (SA) declaring a cursor that returns a text or image column may see a 7131 error when the cursor is opened.
Use the fully qualified name of the object. For example:
Microsoft has confirmed this to be a problem in SQL Server version 6.5. This problem has been corrected in the Post Service Pack 5a Update for Microsoft SQL Server version 6.5. To install the Post Service Pack 5a Update, you must have either SQL Server 6.5 SP5 or SP5a installed.
For information about how to download and install the SQL Server 6.5 Service Pack 5a, refer to the following article in the Microsoft Knowledge Base:
197177 INF: How to Obtain SQL Server 6.5 Service Pack 5a
If you already have SQL Server 6.5 SP5 or SP5a installed, you can download the Post SP5a Update from the following article in the Microsoft Knowledge Base:
274036 INF: How to Obtain SQL Server 6.5 Post Service Pack 5a Update
For more information, contact your primary support provider.
Steps to Reproduce Problem
To reproduce this problem, follow these steps:
Run the following T-SQL script:
exec sp_addlogin test1, null, pubs use pubs exec sp_adduser test1 go grant select on pub_info to test1 go
Next, login as test1 and run this script:
DECLARE pub_info_cursor INSENSITIVE CURSOR FOR SELECT pub_id, logo FROM dbo.pub_info OPEN pub_info_cursor
The open fails with the error message 7131, Level 16, State 1 error.
Now connect as SA and run the same script and it works.
If the table name is fully qualified, such as ' pubs.dbo.pub_info', the error does not occur.