Subject | IBObjets and inserting into Blob |
---|---|
Author | mivi71dk |
Post date | 2009-12-01T14:03:36Z |
Hi
I just upgraded to IBObjects version 4.9.7RC to use with Delphi 2010.
We came from Delphi 5 and IBObjects version 4.8.7.
I have the following procedure in both D5 and D2010.
It works in D5 but inserts a <null> into my blob in D2010.
My code is this:
QTemp3.SQL.Clear;
QTemp3.SQL.Add('Insert Into TaxFree_Bonner ( ');
QTemp3.SQL.Add(' HELEBON_GR, ');
QTemp3.SQL.Add(' Dato, ');
QTemp3.SQL.Add(' Bonnr ');
QTemp3.SQL.Add(') ');
QTemp3.SQL.Add('Values ( ');
QTemp3.SQL.Add(' :PHeleBon, ');
QTemp3.SQL.Add(' :PDato, ');
QTemp3.SQL.Add(' :PBonNr ');
QTemp3.SQL.Add('); ');
QTemp3.ParamByName('PHeleBon').LoadFromFile(FilNavn,ftBlob);
QTemp3.ParamByName('PDato').AsDateTime := NOW;
QTemp3.ParamByName('PBonNr').AsInteger := lBonNr;
The table TAXFREE_BONNER is defined as:
CREATE TABLE TAXFREE_BONNER
(
ID INTEGER NOT NULL,
AFDELING_ID AFDELING_ID ,
UAFD_NAVN MASKINE ,
EKSPNR INTEGER,
DATO DATE,
BONNR INTEGER,
LANDEKODE VARCHAR( 3) COLLATE NONE,
EUROTAXNR VARCHAR( 10) COLLATE NONE,
POSID VARCHAR( 3) COLLATE NONE,
HELEBON BLOB SUB_TYPE 1 SEGMENT SIZE 16384,
LOBENR INTEGER DEFAULT 0,
STREGKODE VARCHAR( 50) DEFAULT '""' COLLATE NONE,
SALGKR NUMERIC( 18, 2) DEFAULT 0,
HELEBON2 BLOB SUB_TYPE 0 SEGMENT SIZE 16384,
HELEBON_GR BLOB SUB_TYPE 0,
CONSTRAINT PK_TAXFREE_BONNER PRIMARY KEY (ID)
);
So when sinse it works in D5 and not in D2010, is it then another error in IBObjects or am I doing anything wrong?
Regards
Michael
I just upgraded to IBObjects version 4.9.7RC to use with Delphi 2010.
We came from Delphi 5 and IBObjects version 4.8.7.
I have the following procedure in both D5 and D2010.
It works in D5 but inserts a <null> into my blob in D2010.
My code is this:
QTemp3.SQL.Clear;
QTemp3.SQL.Add('Insert Into TaxFree_Bonner ( ');
QTemp3.SQL.Add(' HELEBON_GR, ');
QTemp3.SQL.Add(' Dato, ');
QTemp3.SQL.Add(' Bonnr ');
QTemp3.SQL.Add(') ');
QTemp3.SQL.Add('Values ( ');
QTemp3.SQL.Add(' :PHeleBon, ');
QTemp3.SQL.Add(' :PDato, ');
QTemp3.SQL.Add(' :PBonNr ');
QTemp3.SQL.Add('); ');
QTemp3.ParamByName('PHeleBon').LoadFromFile(FilNavn,ftBlob);
QTemp3.ParamByName('PDato').AsDateTime := NOW;
QTemp3.ParamByName('PBonNr').AsInteger := lBonNr;
The table TAXFREE_BONNER is defined as:
CREATE TABLE TAXFREE_BONNER
(
ID INTEGER NOT NULL,
AFDELING_ID AFDELING_ID ,
UAFD_NAVN MASKINE ,
EKSPNR INTEGER,
DATO DATE,
BONNR INTEGER,
LANDEKODE VARCHAR( 3) COLLATE NONE,
EUROTAXNR VARCHAR( 10) COLLATE NONE,
POSID VARCHAR( 3) COLLATE NONE,
HELEBON BLOB SUB_TYPE 1 SEGMENT SIZE 16384,
LOBENR INTEGER DEFAULT 0,
STREGKODE VARCHAR( 50) DEFAULT '""' COLLATE NONE,
SALGKR NUMERIC( 18, 2) DEFAULT 0,
HELEBON2 BLOB SUB_TYPE 0 SEGMENT SIZE 16384,
HELEBON_GR BLOB SUB_TYPE 0,
CONSTRAINT PK_TAXFREE_BONNER PRIMARY KEY (ID)
);
So when sinse it works in D5 and not in D2010, is it then another error in IBObjects or am I doing anything wrong?
Regards
Michael