Subject Re: [ib-support] Alter column and character set
Author Martijn Tonies
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."