UseQuoteChar problem

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for PostgreSQL in Delphi and C++Builder
Post Reply
Claudio
Posts: 25
Joined: Tue 17 Mar 2009 12:47

UseQuoteChar problem

Post by Claudio » Fri 30 Oct 2009 12:26

DLL Version: 1.10.0.7

Delphi 2010.

Driver Parameters:
SQLConnection.Params.Add('EnableBCD=True');
SQLConnection.Params.Add('UnpreparedExecute=True');
SQLConnection.Params.Add('UseQuoteChar=True');
SQLConnection.Params.Add('UseUnicode=True');
SQLConnection.Params.Add('DetectParamTypes=True');

QUERIES NOT QUOTED

Thank´s

Claudio
Posts: 25
Joined: Tue 17 Mar 2009 12:47

Query demo reserved word case sensitive

Post by Claudio » Fri 30 Oct 2009 12:41

create table (name,"DESC");

select name,desc from table; <-- error

select name,"desc" from table; <-- error

select name,"DESC" from table; <-- OK

it´s Correct ?

thank´s

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 24 Nov 2009 10:05

The driver does not change queries that you write by yourself. If you set UseQuoteChar to True, quotes are added to the update statements that are generated when you call the ApplyUpdates method.

If you need to quote a reserved word, it is recommended to use lower case for PostgreSQL:

CREATE TABLE (name, "desc")

Post Reply