Hi,
When tying to update a table using Delphi 7, Unidac and Postgres, I get the
message:
EPgError Column "id" of relation "PROJ_TYPE" does not exist
I have no problems to update a similar FireBird database, with the same program, when I use a
InterBaseUniProvider.
The table has two columns: ID and DESCRIPTION. If I drop ID, then I get
the same error message on DESCRIPTION.
Regards,
Nols Smit
Unidac driver error message with Postgres
Unidac driver error message with Postgres
Hi,
The database has only one table with two columns. The DDL:
CREATE TABLE "public"."PROJECTS" (
"ID" SERIAL,
"DESCRIPTION" VARCHAR(20),
CONSTRAINT "PROJECTS_pkey" PRIMARY KEY("ID")
) WITHOUT OIDS;
I'm using EMS IBManager for Postgres and I test my SQL in it's Query Builder or SQL Editor before using it in Delphi.
Typically the Select statement has the following syntax:
SELECT * FROM public."PROJ_TYPE"
where the schema name is public.
My test Delphi program does display the table's data in a DB grid but when I do an insert by using the DBNavigator, I get the mentioned error message.
Regards,
Nols Smit
The database has only one table with two columns. The DDL:
CREATE TABLE "public"."PROJECTS" (
"ID" SERIAL,
"DESCRIPTION" VARCHAR(20),
CONSTRAINT "PROJECTS_pkey" PRIMARY KEY("ID")
) WITHOUT OIDS;
I'm using EMS IBManager for Postgres and I test my SQL in it's Query Builder or SQL Editor before using it in Delphi.
Typically the Select statement has the following syntax:
SELECT * FROM public."PROJ_TYPE"
where the schema name is public.
My test Delphi program does display the table's data in a DB grid but when I do an insert by using the DBNavigator, I get the mentioned error message.
Regards,
Nols Smit
Unidac driver error message with Postgres
Yes, I figured it out.
The Column names must also be quoted and the SQL is case sensitive. Therefore my insert SQL must be:
INSERT INTO public."PROJ_TYPE"
("DESCRIPTION")
VALUES
(:DESCRIPTION)
and not as generated by TUniQuery
INSERT INTO public."PROJ_TYPE"
(id, description)
VALUES
(:ID, :DESCRIPTION)
Regards,
Nols Smit
The Column names must also be quoted and the SQL is case sensitive. Therefore my insert SQL must be:
INSERT INTO public."PROJ_TYPE"
("DESCRIPTION")
VALUES
(:DESCRIPTION)
and not as generated by TUniQuery
INSERT INTO public."PROJ_TYPE"
(id, description)
VALUES
(:ID, :DESCRIPTION)
Regards,
Nols Smit