Hi,
I have the following exception when I try to execute a query with version 7.0.3 and also with version 7.1.4 :
List index out of bounds (66)
The query :
SELECT * FROM SCHEMA1.TBLTEST
This message appear when you have 2 tables with the same name in 2 distinct schemas.
CREATE DATABASE [DBTEST]
GO
USE [DBTEST]
GO
CREATE SCHEMA [SCHEMA1]
GO
CREATE SCHEMA [SCHEMA2]
GO
CREATE TABLE [SCHEMA1].[TBLTEST](
[ID_0] [int] NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [SCHEMA2].[TBLTEST](
[ID_0] [int] NOT NULL
) ON [PRIMARY]
GO
In ZDbcDbLibMetadata.pas, function UncachedGetColumns (line 1893) the query doesn't care about the schema.
I was able to correct this problem by adding in the where clause something like this :
and o.uid=SCHEMA_ID(<SchemaPattern>)
There may be other requests that could cause problems (like the one in UncachedGetProcedureColumns on line 2711 and in UncachedGetProcedureColumns line 3005), but I didn't have the courage to check them all.
Thanks.
Hello Nicoledit,
I assume, you added that condition to the second query, that retrieves information from syscolumns?
with best regards,
Jan
Hi,
yes, you're right.
Hello Nicloedit,
I checked in your fix into the Zeos 7.2 branch. I will have to check the other UncachedGet* procedures at another time.
With best regards,
Jan
Note: See [r4052] for the example implementation.
Related
Commit: [r4052]
Closed yet. Too old and resolved propably. If there are remaining things todo-> reopen plz.
Regards, Michael