I think there is a bug in ZDbcDbLibMetadata.pas (revision 3115)
in TZSybaseDatabaseMetadata.UncachedGetTables :
a call is made to ComposeObjectString with only 2 parameters :
ComposeObjectString(TableTypes, '"'))
I think this should be :
ComposeObjectString(TableTypes, 'null', '"')
and the same thing in TZSybaseDatabaseMetadata.UncachedGetUDTs.
ComposeObjectString(UDTypes, '"')
should be
ComposeObjectString(UDTypes, 'null', '"')
DbLibMetadata
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: DbLibMetadata
Hi CompsSQL,
have some trouble with my current sybase installation. Got only ASA running. So what's going wrong? Could you give some more details?
have some trouble with my current sybase installation. Got only ASA running. So what's going wrong? Could you give some more details?
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Re: DbLibMetadata
in ZDbcDbLibMetadata.pas
in "function TZSybaseDatabaseMetadata.UncachedGetTables"
in the "with GetStatement.ExecuteQuery" statement, a "format" is used
the last parameter of that format statement is : ComposeObjectString(TableTypes, '"')
the function declaration for that ComposeObjectString method is :
function TZDbLibBaseDatabaseMetadata.ComposeObjectString(const S: String;
Const NullText: String = 'null'; QuoteChar: Char = #39): String;
The call to ComposeObjectString only passes 2 arguments, so the call to ComposeObjectString uses :
param 1 : S => gets filled with TableTypes => OK
param 2 : NullText => gets filled with the quote that was passed in from the call => [b]not ok[/b]
param 3 : QuoteChar => not given in the call, so the default #39 is used
__________
if you change that call to : ComposeObjectString(TableTypes, 'null', '"'), then :
param 1 : S => gets filled with TableTypes => OK
param 2 : NullText => gets filled with the string "null" => OK
param 3 : QuoteChar => gets filled with a double-quote char => OK
__________
if my program, the "TableTypes" parameter was empty.
In the TZDbLibBaseDatabaseMetadata.ComposeObjectString implementation, the first instruction is :
if S = '' then
Result := NullText
But because of the wrong parameters, this "NullText" got filled with a double-quote character
__________
the exact same thing is done in "TZSybaseDatabaseMetadata.UncachedGetUDTs", so that will need to change as well
in "function TZSybaseDatabaseMetadata.UncachedGetTables"
in the "with GetStatement.ExecuteQuery" statement, a "format" is used
the last parameter of that format statement is : ComposeObjectString(TableTypes, '"')
the function declaration for that ComposeObjectString method is :
function TZDbLibBaseDatabaseMetadata.ComposeObjectString(const S: String;
Const NullText: String = 'null'; QuoteChar: Char = #39): String;
The call to ComposeObjectString only passes 2 arguments, so the call to ComposeObjectString uses :
param 1 : S => gets filled with TableTypes => OK
param 2 : NullText => gets filled with the quote that was passed in from the call => [b]not ok[/b]
param 3 : QuoteChar => not given in the call, so the default #39 is used
__________
if you change that call to : ComposeObjectString(TableTypes, 'null', '"'), then :
param 1 : S => gets filled with TableTypes => OK
param 2 : NullText => gets filled with the string "null" => OK
param 3 : QuoteChar => gets filled with a double-quote char => OK
__________
if my program, the "TableTypes" parameter was empty.
In the TZDbLibBaseDatabaseMetadata.ComposeObjectString implementation, the first instruction is :
if S = '' then
Result := NullText
But because of the wrong parameters, this "NullText" got filled with a double-quote character
__________
the exact same thing is done in "TZSybaseDatabaseMetadata.UncachedGetUDTs", so that will need to change as well
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: DbLibMetadata
Hello CompsSQL,
I do have a problem here. In my local copy of Zeos 7.2 I had to do the exactly reverse thing to get it working wity my quite ages Sybase ASE 12.5.
I had to modify to get it working right. So I am not sure, if your modification is correct?
Best regards,
Jan
I do have a problem here. In my local copy of Zeos 7.2 I had to do the exactly reverse thing to get it working wity my quite ages Sybase ASE 12.5.
I had to modify
Code: Select all
ComposeObjectString(TableTypes, '"') // modified to:
ComposeObjectString(TableTypes)
Best regards,
Jan
Re: DbLibMetadata
your solution works for me too.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: DbLibMetadata
Colud you guys attach a patch?
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: DbLibMetadata
Patch applied R3266 \testing-7.2 (SVN)
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/