Page 1 of 1

Blob & array datatypes are not supported for move operation

Posted: Tue 13 Oct 2009 09:57
by Nols Smit
Hi,

I have a demo database and program but can't submit it via the Contact window because I do not know where to look up my license number. My order reference number is 010278473, bought thru ComponentSource on 9/8/2009 5:38:15 PM. I have mailed them about the license number.

I'm using UniDac thru Delphi 7 to a Firebird version 2.1

Server version: WI-V2.1.2.18118 Firebird 2.1
Client version: 6.3

With IBObjects I can load a binary blob but not using UniDac, I get above mentioned error. How can I submit the demo program and Firebird database?

Regards,

Nols Smit

Posted: Tue 13 Oct 2009 11:09
by Plash
You get this error if DataType of the parameter is ftString.

You should set DataType to ftBlob or ftMemo. The correct DataType is set automatically if you use AsBlob or AsMemo properties.

Posted: Tue 13 Oct 2009 11:51
by Nols Smit
Hi,

Thanks for the quick answer, perhaps it was to quick :)

Below is is the code i'm using.

Regards,

Nols Smit

with UniDocuments do
begin
Close;
ParamByName('DocType_ID').AsInteger := 1;
ParamByName('Writer_ID').AsInteger := 1;
ParamByName('Updater_ID').AsInteger := 1;
ParamByName('Description').AsString := 'WhatEver';
ParamByName('Document_Date').AsDateTime := DateTimePicker1.Date;
ParamByName('Tree_Projects_ID').AsInteger := 1;
ParamByName('Abstract').AsString := 'Whatever abstract';
ParamByName('Content').LoadFromStream(BigMs, ftBlob); {uses DB}
ParamByname('Filename').AsString := ApplicationPath + '\TestDoc.xls';
Execute;
end;

Below is the DDL of the table:

CREATE TABLE DOCUMENTS (
ID "ID_Key" NOT NULL /* "ID_Key" = INTEGER NOT NULL */,
DOCTYPE_ID "ID_Integer" NOT NULL /* "ID_Integer" = INTEGER */,
WRITER_ID "ID_Integer" NOT NULL /* "ID_Integer" = INTEGER */,
UPDATER_ID "ID_Integer" NOT NULL /* "ID_Integer" = INTEGER */,
TREE_PROJECTS_ID "ID_Integer" NOT NULL /* "ID_Integer" = INTEGER */,
DESCRIPTION VARCHAR100 NOT NULL /* VARCHAR100 = VARCHAR(100) */,
ABSTRACT "TextBlob" /* "TextBlob" = BLOB SUB_TYPE 1 SEGMENT SIZE 100 */,
DOCUMENT_DATE "DataDate" /* "DataDate" = DATE */,
RECORD_DATE "TIMESTAMP" /* "TIMESTAMP" = TIMESTAMP */,
CHANGE_DATE "TIMESTAMP" /* "TIMESTAMP" = TIMESTAMP */,
FILENAME VARCHAR100 /* VARCHAR100 = VARCHAR(100) */,
CONTENT BINARYBLOB /* BINARYBLOB = BLOB SUB_TYPE 0 SEGMENT SIZE 100 */
);

Posted: Wed 14 Oct 2009 07:01
by Plash
Use AsMemo instead of AsString for the Abstract parameter.

Posted: Wed 14 Oct 2009 09:38
by Nols Smit
Hi,

It's working OK now. Thanks. :)


Regards,

Nols Smit :lol: