Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Wes
  •  Wes
  • Free support Topic Starter
2014-07-02T15:40:40Z
How do I get the decrypted contents of the SQL Command from a SQL Task using the API?

I have used the API to generate the task using VisualCronAPI.Client's Encrypt method, but I now need to go the other direction and read tasks from the API.

Here is the creation code where I encrypt the command text:
var vCTask = job.AddTask(TaskClass.TaskT.SQL);
vCTask.SQL.CommandType = System.Data.CommandType.Text;
vCTask.SQL.EncryptedCommand = client.Encrypt(this.CmdTextDb);
vCTask.SQL.ConnectionId = this.ConnIdDb;
server.Jobs.Update(job);

There is no method for "client.Decrypt".
When I read the task from the API, the EncryptedCommand property contains the byte array. There is also a Command property, but it is always null.
I searched the forum for solutions and found a message related to "ServerObj.Credentials.GetUsername" to solve a similar issue with decrypting credentials. I was not able to locate anything like this in the API for the SQL Command Text.

The VisualCron Client uses the API and it displays the Command Text for SQL tasks, so I assume there must be a way to solve this issue.

Thanks,
Wes
Sponsor
Forum information
Support
2014-07-03T07:29:38Z
Command property is obsolete and only EncryptedCommand is used. There is no reverse method to decrypt right now - but we could add that for a future version. I am moving this topic to Feature requests.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top