Hi,
I'm looking at different use cases for Syncovery, is there a way i can get it to update a SQL record?
There is a pre-existing MS table which logs outgoing files and their names, where i need to update the datetime the file has been uploaded.
Thanks in advance
Update SQL Record On Successful Upload
Re: Update SQL Record On Successful Upload
Hello,
yes, you can implement an OnUploadComplete PascalScript hook that executes a command line tool to update your database.
For example:
See also
https://www.syncovery.com/pascalscript/
yes, you can implement an OnUploadComplete PascalScript hook that executes a command line tool to update your database.
For example:
Code: Select all
function OnUploadComplete(const FileName, LocalFilePath, CompleteURL: UnicodeString;
const isRightSide:Boolean;
const FileSize:Int64;
const Connector: Opaque):Boolean;
begin
Execute('C:\Tools\UpdateTable.bat "'+FileName+'"',120);
Result:=true;
end;
https://www.syncovery.com/pascalscript/
Re: Update SQL Record On Successful Upload
Perfect thanks will give it a go
Re: Update SQL Record On Successful Upload
Hi, It doesnt seem to trigger when using OnUploadComplete.
I can get it to trigger when using OnProfileResults but that doesnt run for each file or contain the filename.
The Sync operation mode im using is Move Files To Desitnation, any idea if theres a way to trigger it for each file?
Thanks in advance
I can get it to trigger when using OnProfileResults but that doesnt run for each file or contain the filename.
The Sync operation mode im using is Move Files To Desitnation, any idea if theres a way to trigger it for each file?
Thanks in advance
Re: Update SQL Record On Successful Upload
Are you actually uploading using an Internet Protocol or just copying between normal Windows paths?
Re: Update SQL Record On Successful Upload
Ah ha, during testing i was just moving to antoher windows folder.
Works great now thanks for your support.
Works great now thanks for your support.