Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Store a file inside a ClientDataSet? 1

Status
Not open for further replies.

Phennim

Programmer
Feb 9, 2004
2
NL
Is it possible to store files inside a TClientDataSet?
They are variable in size up to 200 kilobyte orso (highly doubtfull they will get bigger than that, but there shouldn't be a limit).

Anyways.. I tried multiple variations to the one below, using different datatypes, but I'm unable to get it done.

with MyClientDataSet do
begin
insert;
FieldByName('ID').AsString := id;
FieldByName('FileName').AsString := 'filename.ext';
FieldByName('File')....... := file;
post;
end;

Thanks for your help.
 
Thanks alot,
Now I feel silly :)
Never heard of BLOB before, so I didn't check out how it worked when I saw it as a datatype.

Why are you "afraid"? From what I can tell it works like a charm. Are there drawbacks I'm not seeing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top