Subject | Re: Alter column and character set |
---|---|
Author | rsaegerde |
Post date | 2002-07-31T13:52:51Z |
Martijn,
I created my database (and a lot of others, too) absolutly the same
way as I changed it:
SET NAMES WIN1252;
CONNECT ...
CREATE TABLE Einheiten (
EINHID D_EINHID,
Bezeichnung VARCHAR (10) NOT NULL,
...
Then I can see, in IBExpert for example, column Bezeichnung,
varchar(10), character set win1252.
If it works this way with create... why not with alter...?
Regards
Richard
I created my database (and a lot of others, too) absolutly the same
way as I changed it:
SET NAMES WIN1252;
CONNECT ...
CREATE TABLE Einheiten (
EINHID D_EINHID,
Bezeichnung VARCHAR (10) NOT NULL,
...
Then I can see, in IBExpert for example, column Bezeichnung,
varchar(10), character set win1252.
If it works this way with create... why not with alter...?
Regards
Richard
--- In ib-support@y..., "Martijn Tonies" <m.tonies@u...> wrote:
> Hi Richard,
>
> > from the LANGREF.PDF:
> > ...
> > SET NAMES
> > Specifies an active character set to use for subsequent database
> > attachments.
> > Available in SQL, and isql.
> > ...
>
> Meaning that the CONNECTION has the character set specified.
>
> > Given a table with a column XY VARCHAR(50) CHARACTER SET WIN1252.
> >
> > I want to change the column size to 60 in a script:
> >
> > SET NAMES WIN1252; /* <-- !!! */
> > CONNECT 'myserver:d:\db\mydb.gdb' USER 'SYSDBA'
PASSWORD 'masterkey';
> > SET AUTODDL OFF;
> > ALTER TABLE TBL1 ALTER COLUMN XY TYPE VARCHAR(60);
> > ...
>
> Regardless of the connection characterset, the database default
character
> set will be used if you don't specify a characterset. This is
documented
> behaviour. Did you create your database with a default characterset?
>
>
> Martijn Tonies
> InterBase Workbench - the developer tool for InterBase and Firebird
> http://www.interbaseworkbench.com
>
> Upscene Productions
> http://www.upscene.com
>
> "This is an object-oriented system.
> If we change anything, the users object."