Subject Re: [firebird-support] Impossible to create a new database from a script
Author Walter R. Ojeda Valiente
Hello Mark

Thank you for your answer.

I had tried with ISO8859_1 (which is the character set I always use) and with WIN1252 and the same (bad) results happens.

Neither SET NAMES ISO8859_1 nor WIN1252 solve the problem. Same error in both cases

But with UTF8 it works fine.

However, I want to use ISO8859_1, no UTF8.

After a database is created with the UTF8, is it possible to change its character set to ISO8859_1?

Thanks in advance.

Walter.

Libre de virus. www.avast.com

On Sat, Mar 17, 2018 at 9:50 AM, Mark Rotteveel mark@... [firebird-support] <firebird-support@yahoogroups.com> wrote:
 

On 17-3-2018 14:12, 'Walter R. Ojeda Valiente'
sistemas2000profesional@gmail. com [firebird-support] wrote:
> I am using Firebird 2.5..8 in Windows 7.
>
> I have a script file which contains the lines for create a database and
> theirs domains, tables, triggers, and so on.
>
> The problem is in the lines of comments.
>
> CREATE DATABASE '127.0.0.1/3050:E
> <http://127.0.0.1/3050:E>:\ SQL\SQL_MUAN\DATABASES\MUAN_ MASTER_21.FDB'
>   USER 'SYSDBA'
>   PASSWORD 'masterkey'
>   PAGE_SIZE = 4096
>   DEFAULT CHARACTER SET ISO8859_1
>   COLLATION ES_ES;
>
> SET AUTODDL ON;
>
> -- More lines here
>
> COMMENT ON COLUMN ADICIONALES.ADI_SERVID IS 'Servidor NÂș';
>
> -- More lines here
>
>
> The database is created, no problem there. But on the line: COMMENT ON
> COLUMN the folowing error appears:
>
> *This operation is not defined for system tables.Unsuccessful metadata
> update.*
> *MODIFY RDB$RELATION_FIELDS failed.*
> *Malformed string.*
>
> Thinking that the problem would be the CHARACTER SET, I had changed it
> to WIN1252, ASCII, NONE, and the same error continues. It is impossible
> to create the database.
>
> If I delete the lines which start with COMMENT ON COLUMN (there are a
> lot of them, because each column of each table has a comment) then the
> database can be created. But I don't want to delete the comments, it is
> a team's work and people needs to read those comments.
>
> So, there is a solution?
>
> Is this a bug of Firebird?
>
> Somebody knows how to solve this problem?

What character set is the script file using? Is it using UTF-8 or
WIN1252? You are currently probably connecting using NONE.

If the script file is in UTF-8, add a SET NAMES UTF8;, if the script is
WIN1252, try adding SET NAMES WIN1252; Add this **before** creating the
database.

Mark
--
Mark Rotteveel