Subject | Weirdness with blobs in a table. - Remail |
---|---|
Author | Sean Mathews |
Post date | 2004-06-18T13:08:34Z |
Remailed: Hopefuilly it will catch someones attention :) (Sorry to those as have seen it)
Hi All
FB 1.5 / WinXP Server
I am having some weirdness with a database I am creating. I have created a program that read MySQL metadata and creates the equivalent table on a FB Server, and copies the data. Most of the tables work fine (there are +- 30 tbales). Two tables are giving me problems, both have many blob fields (14 at the most). What happens is the table is created with no error complaint (a primary key is supplied). But when I check the data the first two fields are filled with 0's (for an integer field) and blank (for a character field). I can change this data, but it reverts to the way it was previously on a commit. One table has 57 various fields, the other only about 10. If I use the SQL my program generates to create the table, then create the table manually, it has the same effect, essentially a read only table. If I change the fields to Varchar(potentially truncating the data) it all works fine.
Help. Please. Or I'll kick my cat. Hard.
S
-----------------------TABLE DEF--------------------------
create table trans1(
ID integer not null,
NAME varchar(60) not null,
SZ_ID smallint not null,
TYPE_ID smallint not null,
SZ_TYPE_SUB varchar(30),
HDT smallint not null,
HDN smallint not null,
HDM smallint not null,
HDH smallint not null,
INIT varchar(60) not null,
SPD varchar(120) not null,
SDF varchar(120) not null,
ARF varchar(120),
DARM varchar(120),
FRCH varchar(120) not null,
SA varchar(255),
SQ varchar(255),
SVS varchar(30) not null,
SVSF smallint,
SVSR smallint,
SVSW smallint,
AB varchar(50) not null,
S1 smallint,
S2 smallint,
S3 smallint,
S4 smallint,
S5 smallint,
S6 smallint,
SK blob sub_type 1 segment size 128,
FTS blob sub_type 1 segment size 128,
CLIM varchar(120) not null,
ORG blob sub_type 1 segment size 128,
CHR varchar(35) not null,
CHR_VALUE double precision not null,
TR varchar(120) not null,
AL varchar(60) not null,
ADV varchar(80),
DESCR blob sub_type 1 segment size 128,
DESCRG blob sub_type 1 segment size 128,
DESCR_C blob sub_type 1 segment size 128,
DESCR_SA blob sub_type 1 segment size 128,
DESCR_SK blob sub_type 1 segment size 128,
DESCR_FTS blob sub_type 1 segment size 128,
DESCR_CHR blob sub_type 1 segment size 128,
DESCR_CNS blob sub_type 1 segment size 128,
DESCR_TRA blob sub_type 1 segment size 128,
DESCR_CCA blob sub_type 1 segment size 128,
DFIRST smallint not null,
DVERSION varchar(32) not null,
SOURCE_NAME varchar(32) not null,
SOURCE_URL varchar(32) not null,
SOURCE_EMAIL varchar(32) not null,
SOURCE_ID integer not null,
CREATED date not null,
MODIFIED date not null,
MOD_ID integer not null,
DELETED_FLAG smallint not null);
alter table trans1 add constraint PK_TRANS1 primary key (ID);
Hi All
FB 1.5 / WinXP Server
I am having some weirdness with a database I am creating. I have created a program that read MySQL metadata and creates the equivalent table on a FB Server, and copies the data. Most of the tables work fine (there are +- 30 tbales). Two tables are giving me problems, both have many blob fields (14 at the most). What happens is the table is created with no error complaint (a primary key is supplied). But when I check the data the first two fields are filled with 0's (for an integer field) and blank (for a character field). I can change this data, but it reverts to the way it was previously on a commit. One table has 57 various fields, the other only about 10. If I use the SQL my program generates to create the table, then create the table manually, it has the same effect, essentially a read only table. If I change the fields to Varchar(potentially truncating the data) it all works fine.
Help. Please. Or I'll kick my cat. Hard.
S
-----------------------TABLE DEF--------------------------
create table trans1(
ID integer not null,
NAME varchar(60) not null,
SZ_ID smallint not null,
TYPE_ID smallint not null,
SZ_TYPE_SUB varchar(30),
HDT smallint not null,
HDN smallint not null,
HDM smallint not null,
HDH smallint not null,
INIT varchar(60) not null,
SPD varchar(120) not null,
SDF varchar(120) not null,
ARF varchar(120),
DARM varchar(120),
FRCH varchar(120) not null,
SA varchar(255),
SQ varchar(255),
SVS varchar(30) not null,
SVSF smallint,
SVSR smallint,
SVSW smallint,
AB varchar(50) not null,
S1 smallint,
S2 smallint,
S3 smallint,
S4 smallint,
S5 smallint,
S6 smallint,
SK blob sub_type 1 segment size 128,
FTS blob sub_type 1 segment size 128,
CLIM varchar(120) not null,
ORG blob sub_type 1 segment size 128,
CHR varchar(35) not null,
CHR_VALUE double precision not null,
TR varchar(120) not null,
AL varchar(60) not null,
ADV varchar(80),
DESCR blob sub_type 1 segment size 128,
DESCRG blob sub_type 1 segment size 128,
DESCR_C blob sub_type 1 segment size 128,
DESCR_SA blob sub_type 1 segment size 128,
DESCR_SK blob sub_type 1 segment size 128,
DESCR_FTS blob sub_type 1 segment size 128,
DESCR_CHR blob sub_type 1 segment size 128,
DESCR_CNS blob sub_type 1 segment size 128,
DESCR_TRA blob sub_type 1 segment size 128,
DESCR_CCA blob sub_type 1 segment size 128,
DFIRST smallint not null,
DVERSION varchar(32) not null,
SOURCE_NAME varchar(32) not null,
SOURCE_URL varchar(32) not null,
SOURCE_EMAIL varchar(32) not null,
SOURCE_ID integer not null,
CREATED date not null,
MODIFIED date not null,
MOD_ID integer not null,
DELETED_FLAG smallint not null);
alter table trans1 add constraint PK_TRANS1 primary key (ID);