Page 30 of 44

Posted: 05.09.2012, 15:05
by olehs
EgonHugeist,
I wonder why that not happens on TZTable...
Because UncachedGetTables returns database name in catalog, not in schema.

miab3,
I fixed it in rev.1727

Posted: 05.09.2012, 15:15
by miab3
@EgonHugeist

It's worse. Now I can not open any test procedure from AnyDAC.

D2006, r1726.

Michal

Posted: 05.09.2012, 15:28
by olehs
miab3,

and what about MSSQL, does TZTable work in there?

Posted: 05.09.2012, 16:09
by miab3
@olehs

ZTable1.TableName - '[master].[dbo].[authors]' - opens

ZStoredProc1.StoredProcName - '[master].[dbo].[ABTEST;1]' - error as attached previously
ZStoredProc1.StoredProcName - 'ABTEST;1' - ExecProc work (with the error but that's another issue)

Michal

Posted: 05.09.2012, 16:12
by olehs
Ok, now I see where the problem is. Inavlid identifier quoting.
Should be
[master].[dbo].[ABTEST];1

Posted: 05.09.2012, 16:19
by miab3
@olehs

For [master].[dbo].[ABTEST];1
ExecProc - List index out of bounds (1)

Michal

Posted: 05.09.2012, 16:19
by EgonHugeist
olehs,
Because UncachedGetTables returns database name in catalog, not in schema.
Hmm this isn't logical for me. I wonder about because in mysql we have only a schema, right? And in MsSQL too. I propose to ask Mark befor changing this... It could have a reason, we don't know about.

Anyway this behavior actually isn't acceptable. If i assign the procedurename @runtime everything is fine..

Ok, now I see where the problem is. Inavlid identifier quoting.
And the same for MySQL. In my mind it should be:
`test`,`ABTEST`;..... right? So why do the quotes wissing here?

Posted: 05.09.2012, 16:38
by olehs
I propose to ask Mark befor changing this... It could have a reason, we don't know about.
A reason for what? UncachedGetTables returns database(schema) name in field Catalog for years. The new UncachedGetProcedures you've recently added returned it in Schema, so I made a patch that makes both methods return same data in same fields and it works OK.
And the same for MySQL. In my mind it should be:
`test`,`ABTEST`;..... right? So why do the quotes wissing here?
Quotting is applied using IZIdentifierConvertor, which is smart enough to add quotes only when they are really needed.

Eventually MSSQL's IZIdentifierConvertor is not smart enough to quote procedurename identifier correct.

Posted: 05.09.2012, 16:46
by olehs
miab3,

Btw, what Protocol we are talking about?

Posted: 05.09.2012, 16:50
by miab3
@olehs

ado - SQLNCLI
Only such work (with errors) with MSSQL procedures.

MichaƂ

Posted: 05.09.2012, 19:27
by olehs
miab3,

This is strange, because I don't get errors when execute [dbo].[ABTEST];1

EgonHugeist,

MSSQL returns names of procedures like ABTEST;1
where ;1 is not a part of procedure, but the index of overload.

When quoting is applied in PropertyEditor using IZIdentifierConvertor, the whole ProcedureName gets quoted [ABTEST;1] and it shouldn't. It has to be like [ABTEST];1.

But I think the problem is that TZStoredProcedure doesn't handle overloads.

Michael, do you think we can add overloads handling?

Posted: 05.09.2012, 19:35
by miab3
@olehs

[dbo].[ABTEST];1 - working
[master].[dbo].[ABTEST];1 - not working

D2006

Michal

Posted: 05.09.2012, 19:39
by olehs
miab3,

thank you very much for your feedback. This confirms that we have to add extra methods to Metadata.

Posted: 05.09.2012, 19:41
by olehs
miab3,

do you know where that 'master' come from? Is it specified in your Catalog property?

I'm asking because I do my tests on SQLEXPRESS with SQLOLEDB provider, an I get [dbo].[ABTEST;1]

Posted: 05.09.2012, 20:06
by miab3
@olehs

I removed the 'master' from Catalog and now gets:
[dbo].[ABTEST;1]

Michal