Page 1 of 1

[patch_done] Possible to set the Identifier Quote String ?

Posted: 13.02.2013, 17:29
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

Posted: 15.02.2013, 09:53
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.

Posted: 15.02.2013, 09:57
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?

Posted: 15.02.2013, 09:59
by mrossij
Thank you, it would be a wonderful change!

Mario

Posted: 15.02.2013, 10:04
by EgonHugeist
mrossij,

i'll implement my proposal. But currently i'm bussy with moving house.. I will post again if it's done.

Posted: 15.02.2013, 10:08
by mrossij
Ok good moving house.

Thanks

Posted: 17.02.2013, 12:10
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?

Posted: 19.02.2013, 11:51
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