[patch_done] Possible to set the Identifier Quote String ?

The stable tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.
Post Reply
mrossij
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: 21.11.2009, 19:00

[patch_done] Possible to set the Identifier Quote String ?

Post by mrossij »

Ciao, I'm writing a program that connects to a database Gupta SQLBase (Unify). I connect with Ado. When I use a TZtable, if I do a delete (tb1.delete) I get an error message:
"[Unify] [ODBC Driver] [SQLBase] 00909 PRS INC Invalid character"
Running the program in debug I found that the delete function is translated by Zeos in a specific sql:
"delete from [SYSADM]. [TABLENAME] where ......... "
The problem is that the bracket [ not's accepted by Unify. I saw that Zeos calls the function:
TZAdoDatabaseInfo.GetIdentifierQuoteString function: string;
begin
    Result: = '[]';
end;
to obtain the identifier.
Finally my question: how can I tell Zeos not use square brackets?

Thank you in advance.

Mario
mrossij
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: 21.11.2009, 19:00

Post by mrossij »

Probably was not provided the opportunity to indicate which string to use for the Quote.
The only possibility that remains is to change the routine GetIdentifierQuoteString so:

TZAdoDatabaseInfo.GetIdentifierQuoteString function: string;
begin
Result: = '';
end;

Other databases accept a syntax without brackets and my problem is solved. The only thing is that I'll have to remember to change this function for any Zeos update.
Thanks anyway.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

mrossij,

sorry for the delay. We can make a patch for your issue. Proposal:

TZConnection.Properties.Values['Identifier_Quotes'] := '';

This could overwrite the defaults. What do you think about it?
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
mrossij
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: 21.11.2009, 19:00

Post by mrossij »

Thank you, it would be a wonderful change!

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

Post by EgonHugeist »

mrossij,

i'll implement my proposal. But currently i'm bussy with moving house.. I will post again if it's done.
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
mrossij
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: 21.11.2009, 19:00

Post by mrossij »

Ok good moving house.

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

Post by EgonHugeist »

mrossij,

patch done. R2183 \testing-7.1 (SVN)

You've to add 'identifier_quotes=' to the TZConnection.Properties. Also is it possible to set quotes like 'identifier_quotes=§§' etc. Hope you test it?
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
mrossij
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: 21.11.2009, 19:00

Post by mrossij »

First of all, sorry for the delay but I had big problems to my work.
The change is perfect and works perfectly.
I've tried both to insert the parameter to the component in designing mode, both in the program as a code:
ZConnName.Properties.Values['identifier_quotes'] := '';

All ok!
Thanks for the useful change.

Mario
Post Reply