Community
Showing results for 
Search instead for 
Do you mean 
Reply

Cant change the password from SDK

Highlighted
Copper Contributor
Posts: 189
Country: Netherlands

Cant change the password from SDK

I have a powershell script in which I restore an Act! database. After that, I'd like to change the password.

The code below does not work although I believe this is the correct overload:

 

[System.Reflection.Assembly]::LoadWithPartialName('Act.Framework');
$ActFrameworkObj = New-Object Act.Framework.ActFramework;
$ActFrameworkObj.RestoreDatabaseAs("$target", ".", "SQL", "$path", "ADMINUSERNAME", "ADMINPASSWD", "$backuppath", "", $null, "false");
$ActFrameworkObj.LogOn("ACTUSERNAME", "CURRENTACTPASSWD", "SQL", ".", "DBNAME", "NEWPASSWORD"); // THIS FAILS!

 

I get this exception:

Exception calling "LogOn" with "6" argument(s): "Error in the application."

 

What's going wrong here?

I also tried putting a sleep in the script between RestoreDatabaseAs and Logon, but that didn't work either.

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands