ClientDataSet Append Error

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for PostgreSQL in Delphi and C++Builder
Post Reply
Eden0928
Posts: 62
Joined: Sun 22 Apr 2012 14:08

ClientDataSet Append Error

Post by Eden0928 » Mon 23 Apr 2012 03:26

Below my Table struct:

Code: Select all

CREATE TABLE biolife( 
"Species No" REAL DEFAULT 0.0 , 
Category VARCHAR(15) DEFAULT '' , 
Common_Name VARCHAR(30) DEFAULT '' , 
"Species Name" VARCHAR(40) DEFAULT '' , 
"Length (cm)" REAL DEFAULT 0.0 , 
Length_In REAL DEFAULT 0.0 , 
Notes TEXT , 
Graphic BYTEA 
);
I used TClientDataSet.Append one records.
dbMonitor have a message:

Code: Select all

INSERT INTO biolife
  (Species No, category, common_name, Species Name, Length (cm), length_in, notes, graphic)
values
  ($1, $2, $3, $4, $5, $6, $7, $8)
This is wrong. So, I can not append a record in table.
It should:

Code: Select all

INSERT INTO biolife
  ("Species No", category, common_name, "Species Name", "Length (cm)", length_in, notes, graphic)
values
  ($1, $2, $3, $4, $5, $6, $7, $8)
And, Why get a non normal message:

Code: Select all

??語�??�誤"?��??��? No
Is not unicode?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Mon 23 Apr 2012 12:34

hello,

If you use Delphi 2007 and higher, you can solve this problem by setting the UseQuoteChar option to true

SQLConnection1.Params.Values['UseQuoteChar'] := 'true';

The message language can be set at the server side, maybe you use a languge that is not supported by your client

Post Reply