BUG: Selecting Text or Image Field Using Table Owner's Name Causes Error

ID: Q217102


The information in this article applies to:

BUG #: 18594 (SQLBUG_65)

SYMPTOMS

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.


RESOLUTION

A supported fix that corrects this problem is now available from Microsoft, but it has not been fully regression tested and should be applied only to systems experiencing this specific problem. If you are not severely affected by this specific problem, Microsoft recommends that you wait for the next SQL Server 6.5 Service Pack that contains this fix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information on support costs, please go to the following address on the World Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp



WORKAROUND

Use the fully qualified name of the object. For example:


   pubs.dbo.pub_info 


STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5 Service Pack 5.


MORE INFORMATION

Steps to Reproduce Problem

To reproduce this problem, follow these steps:
  1. 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 


  2. 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.


  3. 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.

Additional query words: servsp_cursor view


Keywords          : kbSQLServ650bug 
Version           : winnt:6.5
Platform          : winnt 
Issue type        : kbbug 

Last Reviewed: July 2, 1999