Re: What to implement first?

Hi All,

Anyone on here know how to execute an external program, for example a database full of pdf and tiff files names and drive location, On click load pdf viewer and display the filename stored in the database.

Thanks in advance.

177 (edited by CDB 2020-09-21 18:57:00)

Re: What to implement first?

Here is the code I use.  Windows will automatically open the registered application according to file type. Amend to your own circumstances.

To open a file displayed in a tablegrid by double clicking  on a row.

procedure frmMain_tgDatasheets_OnCellDoubleClick (Sender: TObject; ACol, ARow: Integer);
  fName :string;
  fName := SQLExecute('SELECT DISTINCT datasheetFile_Filename FROM Datasheets WHERE id = '+frmMain.tgDatasheets.SQLValue);

If you are using a tablegrid to display the database entries, then just set that up using the standard tablegrid wizard in VDB.

I've attached an image of my program displaying two rows of information. Clicking on either of them will open a different document. One is a PDF and the other is a text item.

Post's attachments

Attachment icon display_items.PNG 9.79 kb, 27 downloads since 2020-09-21 

On a clear disk you can seek forever

Re: What to implement first?

Good Day MVD Devs.

I got an idea on the password being implemented in User-Role feature. I successfully determined the hash being used in it and will help me in my future development when I have to reset user's password, have an auto-generated password etc. But for the other developer who doesn't know how that password is being hashed/encrypt will bump to a dead-end. I think it is much better to encrypt the password using the EcryptRC5 Function and let the Key disclosed/editable to the developer or make it as a property or a setting something like that. In that way, it is more secure for the password and less hassle for the developer.

Thank you and looking forward for the next update. Please do notice us. smile



Re: What to implement first?

Many thanks CDB, sorry for the late reply.