I’m using DB to keep the sketch photo. Because it needs to show in Crystal Report and export to Excel by TMS FlexCel component. I want to using file base. Is DA handle that?
what do you mean under
file base ?
That means the table keep the file path only and photo files are keeping in file server.
you can keep file path in the DB and send image to client by request (via custom method) or read image and put it to dataset in the
Bin2.OnWriteFieldValueEx event on server-side.
in second way, you should declare field as ServerCalculated or include it to SQL like
NULL as "PhotoField"
BLOB type for this field.
OnWriteFieldValueEx event, you should read image from disk and fill correspondent field.
Thanks. I will try it. Any demo for my reference.
check this sample:
VCLApplication.zip (61.5 KB)
Thanks for your example. I tested and have the basic concept about this. But if table has more than 1 photo field, then I need to pass the fieldslist in DataStreamerWriteFieldValueEx. Right?
in this event you can check for all photo fields:
if aField.Name = 'Photo' then begin ... end .. else if aField.Name = 'Photo9' then begin ... end;
Haha… Yes. I forgot to use this solution. Because I focus on multiple fields that like DataParameterArray.