SCM

[#1010636] Can not access table columns with accents in SQL_ASCII encoding

View Trackers | Bugs | Download .csv | Monitor

Date:
2009-05-21 15:23
Priority:
3
State:
Open
Submitted by:
Juan Carlos Segui (asceta)
Assigned to:
Nobody (None)
Npgsql Version:
2.0
Category:
Group:
Resolution:
None
Summary:
Can not access table columns with accents in SQL_ASCII encoding

Detailed description
I'm using npgsql 2.0.5 and postgresql 7.3.13. The DB is a legacy database that has some column names with accents on it. The database encoding is SQL_ASCII. When I try to access these tables I get the following error:

ERROR: No such attribute client0_.dirección

If I look at the exception in detail, it seems the SQL is correctly formed (in fact I can execute it in pgAdmin without changing anything).

This is the NpgsqlException.ErrorSql property value:

SELECT client0_.codigocliente as codigocl1_1_0_, client0_.nombrecomercial as nombreco2_1_0_, client0_.nombrefactura as nombrefa3_1_0_, client0_.personacontacto as personac4_1_0_, client0_.cif as cif1_0_, client0_.estado as estado1_0_, client0_."dirección" as dirección7_1_0_ FROM cliente client0_ WHERE client0_.codigocliente=((4307029)::int4)

This SQL query works as is in pgAdmin.

And the table definition:

CREATE TABLE cliente
(
codigocliente integer NOT NULL DEFAULT 0,
nombrecomercial character varying(50),
nombrefactura character varying(50),
personacontacto character varying(50),
cif character varying(50),
estado smallint DEFAULT 0,
tipo smallint DEFAULT 0,
"dirección" character varying(50),
codigopostal character varying(15) DEFAULT 0,
ciudad character varying(50),
provincia character varying(50),
"país" character varying(2),
"teléfono" character varying(20),
fax character varying(20),
"e-mail" character varying(50),
"e-mail2" character varying(50),
CONSTRAINT cliente_pkey PRIMARY KEY (codigocliente),
)
WITH OIDS;

Thank you

Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge