Welcome! Log In Create A New Profile

Advanced

Saving a video file?

Posted by ambrit 
Saving a video file?
May 05, 2022 04:00PM
Hi. I can save an image in a binary memo field. So if the original file is lost there is always a copy saved.

I thought you could do the same with a video file (mp4 for example) but it does not seem to work. Does someone have a code snippet how to do this please? I am sure I am missing something obvious.

Or is the only way to copy the video somewhere safe and save the link in the data file?

Thx

John



Edited 1 time(s). Last edit at 05/05/2022 04:21PM by ambrit.
pao
Re: Saving a video file?
May 05, 2022 05:40PM
You can save MP4 files in the DB the same way you use to save JPG, PDF, ..., just use HLINKMEMO function before the HADD/HMODIFY
In a binary memo you can put any file type.

Regards

Paulo Oliveira
Re: Saving a video file?
May 05, 2022 06:27PM
Thx. That's what I had always assumed and felt sure I had done it before on an old app. I am using WD21 but don't think that's the issue. Am using HLINKMEMO so will check it out again.
Argus
Re: Saving a video file?
May 05, 2022 08:04PM
I confirm it's working fine that way...

If your code is not working, publish it here, as there must be a problem in it
Re: Saving a video file?
May 06, 2022 12:58AM
Its so simple ....

I have the video playing in a Multimedia control (MM_Video) and the path is saved in EDT_Video. I then save the video using:

HLinkMemo(HistoryImaging, Photo, EDT_Video, hMemoBin)

What could possibly be wrong?

John
Re: Saving a video file?
May 06, 2022 01:35PM
Try Herror, this will give you a hint

possible error: The function will return an error if the file to associate is opened in read/write mode and if the hAcceptOpenedFile constant is not used.

regards, Heinz
Re: Saving a video file?
May 06, 2022 07:49PM
Thanks for that. Sadly it comes back with error 0. But looking at the data file directly it is showing the memo field as 0 bytes. Time to take out some time to investigate further.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: