Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-04

need suggestion about TDataset.Lookup

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

FreeMan
hi,
I need use TDataset.Lookup, I know how to do this, but need help about,
result field is blob field
Var
  V : Variant;
BlobField : TBlobField;
..
V := QUE_.Lookup('UNQ_ID', H_ID, 'BIN_DATA');// BIN_DATA type is TBlobField
if V=Null then Exit;
   BlobField := TBlobField(V);//<- Problem is here !!!
//  if QUE_.Locate('UNQ_ID', VarArrayOf([H_ID]), [])
//   then BlobField := TBlobField(QUE_.FieldByName('BIN_DATA'))
//   else Exit;

I'm looking for fast way

Reply by email

Joost van der Sluis
to FreeMan
FreeMan wrote
I need use TDataset.Lookup, I know how to do this, but need help about, result field is blob field

The whole idea of blob-fields is that they are not loaded into the dataset-in-memory.

They are only read from the database if they are specifically read.

So, no, you can not use lookup to access them.

Joost.

Reply by email

FreeMan
to Joost van der Sluis

Thank you,
I added new Tquery and use where clause and result one tblobfield. I found best and fast way this.

Joost van der Sluis wrote 19 lines
On 04/16/2015 03:10 PM, FreeMan wrote: > I need use TDataset.Lookup, I know how to do this, but need help about, > result field is blob field The whole idea of blob-fields is that they are not loaded into the dataset-in-memory. They are only read from the database if they are specifically read. So, no, you can not use lookup to access them. Joost. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email