Subject | Re: [IBO] Select, UTF8 and malformed string |
---|---|
Author | mivi71dk |
Post date | 2010-12-22T13:06:23Z |
The column does not exist
Its just a returnvalue.
The SQL works from within DBWorkbench.
The DLL o the table is
CREATE TABLE GIFTCARD
(
ID INTEGER NOT NULL,
GIFTCARD_ID D_ID ,
MACHINE_ID INTEGER,
COMPANY_ID INTEGER,
GC_CREATED TIMESTAMP DEFAULT 'NOW',
GC_MODIFIED TIMESTAMP DEFAULT 'NOW',
GC_CLOSED TIMESTAMP DEFAULT 'NOW',
GC_STATE INTEGER DEFAULT 0,
CUSTOMER_ID INTEGER DEFAULT 0,
GC_VALUE FLOAT DEFAULT 0,
GC_CURRENCY D_CURRENCYNAME ,
GC_CURRENCYRATE FLOAT DEFAULT 100,
GC_VALUE_VAL FLOAT DEFAULT 0,
GC_CURRENCY_VAL D_CURRENCYNAME ,
GC_CURRENCYRATE_VAL FLOAT DEFAULT 100,
GC_TEXT VARCHAR( 400) DEFAULT '""' COLLATE UTF8,
GC_ALARM INTEGER DEFAULT 0,
GC_ALARM_TEXT VARCHAR( 400) DEFAULT '""' COLLATE UTF8,
GC_PASSWORD D_PASSWORD ,
GC_CREATE_VALUE FLOAT DEFAULT 0,
GC_CREATE_VALUE_VAL FLOAT DEFAULT 0,
CONSTRAINT PK_GIFTCARD PRIMARY KEY (ID)
);
Its just a returnvalue.
The SQL works from within DBWorkbench.
The DLL o the table is
CREATE TABLE GIFTCARD
(
ID INTEGER NOT NULL,
GIFTCARD_ID D_ID ,
MACHINE_ID INTEGER,
COMPANY_ID INTEGER,
GC_CREATED TIMESTAMP DEFAULT 'NOW',
GC_MODIFIED TIMESTAMP DEFAULT 'NOW',
GC_CLOSED TIMESTAMP DEFAULT 'NOW',
GC_STATE INTEGER DEFAULT 0,
CUSTOMER_ID INTEGER DEFAULT 0,
GC_VALUE FLOAT DEFAULT 0,
GC_CURRENCY D_CURRENCYNAME ,
GC_CURRENCYRATE FLOAT DEFAULT 100,
GC_VALUE_VAL FLOAT DEFAULT 0,
GC_CURRENCY_VAL D_CURRENCYNAME ,
GC_CURRENCYRATE_VAL FLOAT DEFAULT 100,
GC_TEXT VARCHAR( 400) DEFAULT '""' COLLATE UTF8,
GC_ALARM INTEGER DEFAULT 0,
GC_ALARM_TEXT VARCHAR( 400) DEFAULT '""' COLLATE UTF8,
GC_PASSWORD D_PASSWORD ,
GC_CREATE_VALUE FLOAT DEFAULT 0,
GC_CREATE_VALUE_VAL FLOAT DEFAULT 0,
CONSTRAINT PK_GIFTCARD PRIMARY KEY (ID)
);
--- In IBObjects@yahoogroups.com, Lucas Franzen <luc@...> wrote:
>
>
>
> Am 22.12.2010 13:29, schrieb mivi71dk:
> > I tried this:
> >
> > SELECT
> > GIFTCARD_DETAIL.GCD_DATE,
> > GIFTCARD_DETAIL.GCD_VALUE,
> > GIFTCARD_DETAIL.GCD_POSNUMBER,
> > GIFTCARD_DETAIL.GCD_STATUS,
> > CASE GIFTCARD_DETAIL.GCD_STATUS
> > WHEN 100 THEN cast('Fulført' as varchar(100) )
> > WHEN 255 THEN cast('Annulleret' as varchar(100) CHARACTER SET UTF8)
> > WHEN 250 THEN cast('Limbo' as varchar(100) CHARACTER SET UTF8)
> > else cast('Ukendt' as varchar(100) CHARACTER SET UTF8)
> > end as Status_Text
> > FROM
> > GIFTCARD_DETAIL
> > Where
> > GIFTCARD_DETAIL.GIFTCARD_ID = :ID
> > Order by GIFTCARD_DETAIL.GCD_DATE
> >
> > Which still came up with the MALFORMED STRING
>
> You did specify the character set in every column BUT the one with
> "Fulført" in it.
>
> On my side it works with:
>
> WHEN 100 THEN cast('Fulført' as varchar(20) character set UTF8 )
>
> (But it does also without, since I use WIN1252.
>
> Luc.
>