Subject Re: [ib-support] Default database collation
Author Achim Kalwa
Helen Borrie schrieb:

[...]
> At 12:10 PM 13-05-02 +0200, Achim Kalwa wrote:
>
> >I just ran into problems by adding a new varchar-field to an existing
> >table: "alter table AUFTRAG add E_USER varchar(30)"
> >The new field has no character set defined.
>
> Before you go racing off on the assumption that the new column has no
> character set defined, make sure that you've tested to be certain it's not

I've opened the database with IBConsole (1.0.1.343) and selected that
table. On the properties page, the "old fields" has a "character set
WIN1252", the column showing the character set is empty. The "metadata"
page shows something like this:

CREATE TABLE USR
(
ID INTEGER NOT NULL,
LOGIN VARCHAR(30) CHARACTER SET WIN1252,
LASTLOGIN TIMESTAMP,
TEST VARCHAR(30), <-- this field added using "alter table"
PRIMARY KEY (ID)
);

No character set for field "TEST".

> taking the default for the database. You could test it by trying to insert
> _NONE character data into the field. If it is NONE, it will take anything
> at all; if it is WIN1250 (or something else) you should get a
> transliteration error.
>
> insert into aTable(oldcol, newcol)
> values('something', _NONE 'something in charset WIN1250')

Ok, I'll test it...
(10 Minutes later:)
inserting the data works; but a "select * from AUFTRAG"
raised a transliteration error.

I've tested this with IBConsole (with default character set defined on
register database dialog), and Borland SQL-Explorer, which is a BDE-based
application.

> What could have happened is that you connected to the database using
> character set NONE. Any new columns you defined without a character set
> would (I think) take the character set of the connection.

My application is BDE-based (V5.1.1) with Borland Interbase Driver. The
"LANGDRIVER" property is set to "WEurope ANSI". And - of course - it is a
dialect-1 database.

On an other machine I have Interbase 6.0. On that machine, the default
character set is set correctly to the new field.

Any hints?

Achim

P.S:
Why do I see your reply on egroups.ib-support, but my post does not?