CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Send file to Database!

General discussion

by Lynkin » 06 May 2014 18:12

Hello, I'm trying to use the "LoadFromFile" function on Delphi to get the files inside the "FileUpload" component to save on a "ftBlob" field on the database.

Here's my code:

CDS_CADASTRO.FieldByName('ARQUIVO_BIN').SetFieldType(ftBlob);
(CDS_CADASTRO.FieldByName('ARQUIVO_BIN') as TBlobField).LoadFromFile("ComponentName"."WHAT SHOULD GO HERE?");

But it's not working... help again ?
Lynkin
 
Posts: 26
Joined: 24 Apr 2014 19:53

by Jorge Sousa » 06 May 2014 18:19

Should be the FileName

following what we've been discussing about download will be FileUpload.FileNames.ValuesByIndex[0]
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Lynkin » 06 May 2014 18:32

It worked, but i had to change the code you provided...

"ValueFromIndex[0]"

Thanks! =)
Lynkin
 
Posts: 26
Joined: 24 Apr 2014 19:53

by Jorge Sousa » 06 May 2014 18:55

Yes ValueFromIndex sorry
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to General - Archive

cron

Who is online

Users browsing this forum: No registered users and 2 guests

Contact Us.