1 (edited by AD1408 2016-11-03 09:55:38)

Topic: DBFile component

Hi Guys,


Pulling data from other forms into different form script works fine thanks to Dmitry and Derek.


One thing I forgot to ask at that time ws dbFile field type.


Pulling data for text field type, which works fine:

form1.memSearchDesc.text := sqlexecute('select description from Details where id ='+inttostr(form1.tgSearch.dbitemid));

I tried for dbFile type:

form1.dbFileSearch01.DBFile := sqlexecute('select file_link1 from Details where id ='+inttostr(form1.tgSearch.dbitemid));

However, it didn't work. Also tried .File and .Text with no success.


Could somebody correct the above dbFile script please........


ps/. I'm using it for "LinkFolder" type. If script changes when "LinkFile" or "StoreFile" types used please include the additional scripts.

Adam
God... please help me become the person my dog thinks I am.

Re: DBFile component

Example

form1.dbFileSearch01.dbFileName := sqlexecute('select file_link1_filename from Details where id ='+form1.tgSearch.sqlValue);
form1.dbFileSearch01.Text :=sqlexecute('select file_link1_filename from Details where id ='+form1.tgSearch.sqlValue);

also you should set the property Type=LinkFolder for the component dbFileSearch01

Dmitry.

Re: DBFile component

Thank you so much Dmitry............


Works nicely.

Adam
God... please help me become the person my dog thinks I am.