Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Query and Blob Field

 Post Reply Post Reply
Author
Zelaya Medrano Omar Edgardo View Drop Down
New Member
New Member
Avatar

Joined: 22 Mar 2012
Posts: 34
Post Options Post Options   Quote Zelaya Medrano Omar Edgardo Quote  Post ReplyReply Direct Link To This Post Topic: Query and Blob Field
    Posted: 11 Jun 2014 at 7:10pm
Hi,
I'm have the following Query

INSERT INTO DATDECH (ANIOID,NROID,FECHAALTA,ACCION,DESCRICPION,ERRORES,
FECHAHORATRANS,NROTRANS,BINDATA) VALUES (:ANIOID,:NROID,:FECHAALTA,:ACCION,
:DESCRICPION,:ERRORES,:FECHAHORATRANS,:NROTRANS,:BINDATA)

when  executed  I get the following exception: "InsDatDEcH: Field 'BINDATA' is of an unknown type"

Does TXDataSet and REmoteDB supports inserting/reading blobl fields?

Using UNIDAC/FireBird

"BINDATA                        BLOB SUB_TYPE 0 SEGMENT SIZE 80"

Thanks in Advance,

Omar Zelaya
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2898
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 12 Jun 2014 at 11:47am
Hi,
yes, it does support it. Can you provide detailed code about how you are executing the query? What is InsDataDEcH? Is "BINDATA" he's referring to the field or the param? Maybe you are not setting Param.DataType somehow?
Back to Top
Karl-Heinz Otter View Drop Down
New Member
New Member
Avatar

Joined: 29 Jun 2017
Posts: 2
Post Options Post Options   Quote Karl-Heinz Otter Quote  Post ReplyReply Direct Link To This Post Posted: 23 Sep 2019 at 8:25pm
I have also a problem with BlobField. How can I set the value of the blobfield (RemoteDB)? A function like Loadfromstream are not available.
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2898
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 23 Sep 2019 at 9:42pm
Why you say LoadFromStream is not available? TXDataset is a regular dataset which has the same TField objects that are common to all datasets, including TBlobField, for example. The mechanism of dealing with field values is the same.
Back to Top
Zelaya Omar View Drop Down
Member
Member
Avatar

Joined: 15 Nov 2010
Posts: 86
Post Options Post Options   Quote Zelaya Omar Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 2020 at 12:29am
Hi,
Testing again with TXDataSet, inserting a row on a table that contains a BLOB FIELD I get the following error when I call ExecSQL.

Dynamic SQL Error
SQL error code = -303 feature is not supported BLOB and array data types are not supported for move operation.

Thanks in advance,

Omar Zelaya
Back to Top
Karl-Heinz Otter View Drop Down
New Member
New Member
Avatar

Joined: 29 Jun 2017
Posts: 2
Post Options Post Options   Quote Karl-Heinz Otter Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 2020 at 6:29am
Hi Omar,
I use RemoteDB with Blobfield as follows:

XDatasetDoc.SQL.Clear;
XDatasetDoc.SQL.Add('insert into table1 (name, surname, street, notice, typ)');
XDatasetDoc.SQL.Add('VALUES');
XDatasetDoc.SQL.Add('('''+Name+''', '''+Surname''','''+Street+''', :Notiz, '+Typ+')');
XDatasetDoc.ParamByName('Notiz').LoadFromFile(FileUpload.FileName, ftBlob);
XDatasetDoc.Execute;

Instead of LoadFromField, of course, any other assignment can be made

Best wishes Karl-Heinz
Back to Top
Zelaya Omar View Drop Down
Member
Member
Avatar

Joined: 15 Nov 2010
Posts: 86
Post Options Post Options   Quote Zelaya Omar Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 2020 at 2:25pm
I forgot to mention i'm using TGenericDatabase for connection.

Thanks in advance,

Omar Zelaya
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2898
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 2020 at 3:09pm
Again, can you provide detailed code? We can't guess what's going on.
Have you tried the provided suggestions?
Back to Top
Zelaya Omar View Drop Down
Member
Member
Avatar

Joined: 15 Nov 2010
Posts: 86
Post Options Post Options   Quote Zelaya Omar Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 2020 at 3:13pm
Hi,

Using FireBird and UniDAC, I have also tried to set the Parameter type to ftBlob also tried using AsBlob with no succes.

On UniDAC forums "It return this error if parameter for blob is ftString."

Thanks in advance,

Omar Zelaya
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2898
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 2020 at 3:15pm
Please provide the code. Steps to reproduce. 
Back to Top
Zelaya Omar View Drop Down
Member
Member
Avatar

Joined: 15 Nov 2010
Posts: 86
Post Options Post Options   Quote Zelaya Omar Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 2020 at 3:29pm
Hi,

Fixed now, there was a text blob field on the table and needed to use AsMemo instead of AsString.

Thanks
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down