DbLibMetadata

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
CompsSQL
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 03.03.2012, 12:48

DbLibMetadata

Post by CompsSQL »

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', '"')
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: DbLibMetadata

Post by EgonHugeist »

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?
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/

Image
CompsSQL
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 03.03.2012, 12:48

Re: DbLibMetadata

Post by CompsSQL »

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
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: DbLibMetadata

Post by marsupilami »

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

Code: Select all

ComposeObjectString(TableTypes, '"') // modified to: 
ComposeObjectString(TableTypes)
to get it working right. So I am not sure, if your modification is correct?
Best regards,

Jan
CompsSQL
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 03.03.2012, 12:48

Re: DbLibMetadata

Post by CompsSQL »

your solution works for me too.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: DbLibMetadata

Post by EgonHugeist »

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/

Image
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: DbLibMetadata

Post by EgonHugeist »

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/

Image
Post Reply