格式错误的字符串IN默认字段

时间:2017-02-24 12:49:55

标签: firebird

我正在尝试将Firebird 2.1数据库迁移到2.5,并且在默认字段中发生错误。我应该使用哪种字符集?

SET SQL DIALECT 3;

CREATE DATABASE 'F:\Sistemas\mga\DataBase\CRIAR.GDB' USER 'SYSDBA' PASSWORD 'masterkey' PAGE_SIZE 16384 DEFAULT CHARACTER SET NONE;

CREATE TABLE ESTOQUE ( ID INTEGER, FORNECEDOR_ID INTEGER, FUNCIONARIOS_ID INTEGER, ID_TABELA INTEGER, DATA DATE, QUANTIDADE NUMERIC(15,2), VALOR_UNITARIO NUMERIC(15,5) DEFAULT 0, TABELA VARCHAR(100) CHARACTER SET NONE, SAFRA_ID NUMERIC(18,0), VALOR_TOTAL NUMERIC(15,2), TIPO VARCHAR(100) CHARACTER SET NONE, PROPRIEDADE_ID INTEGER, PLACAS VARCHAR(100) CHARACTER SET NONE, NOTAS VARCHAR(100) CHARACTER SET NONE, MOTORISTA VARCHAR(100) CHARACTER SET NONE, BLOQUEADO VARCHAR(3) CHARACTER SET NONE DEFAULT 'NÃO', DESCRICAO BLOB SUB_TYPE 1 SEGMENT SIZE 80 CHARACTER SET NONE, FRETE NUMERIC(15,2) );

错误:: BLOQUEADO VARCHAR(3)CHARACTER SET NONEDEFAULT'NÃO',



This operation is not defined for system tables.
unsuccessful metadata update.
STORE RDB$RELATION_FIELDS failed.
Malformed string.

我尝试:

SET NAMES WIN1252;
WIN1252
CHARACTER SET WIN1252,
CHARACTER SET ISO8859_1
COLLATE PT_BR

但是,这没关系


update ESTOQUE set BLOQUEADO='NÃO' ;

1 个答案:

答案 0 :(得分:0)

备份数据库并尝试使用以下选项进行恢复:

 c:\Program Files\Firebird\Firebird_2_5\bin\gbak.exe -R O c:\temp\my_backup.FBK my_new_database.fdb 
 -FIX_FSS_M WIN1252 -FIX_FSS_D WIN1252 -USER SYSDBA -PAS masterkey -V