Microsoft KB Archive/233374

= BUG: Error 7356 When Using SQL 7.0 to Select From a SQL 6.5 View =

Article ID: 233374

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q233374



BUG #: 55712 (SQLBUG_70)



SYMPTOMS
Under the following conditions:
 * SQL Server 7.0 is used to select from a view residing on a linked SQL Server 6.5.
 * The view is defined in a different 6.5 database than the 6.5 table used to define the view.
 * The view selects a column from the table, which is defined as CHAR(x) NULL.

The following error will be generated:

Server: Msg 7356, Level 16, State 1, Line 1

OLE DB provider 'SQLOLEDB' supplied inconsistent metadata for a column. Metadata information was changed at execution time.



WORKAROUND
Use any of the following workarounds:  Define the view in the same database as the table used to create the view.  Use the CONVERT function to convert the CHAR column to a VARCHAR in the view. For example: CREATE VIEW My65View AS     SELECT CONVERT (VARCHAR, CharColumn) AS CharColumn FROM My65Table  Change all CHAR(x) NULL values to VARCHAR(x) NULL values in the table.  Create and run the view from SQL Server 7.0. For example, on SQL 7.0: CREATE VIEW My70View AS      SELECT CharColumn FROM My65Server.My65Database.TableOwner.My65Table GO

SELECT * FROM My70View GO                       



STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0.

Keywords: kbbug kbinterop kbpending KB233374

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.