Community
Showing results for 
Search instead for 
Do you mean 
Reply

My program just stops working

Copper Contributor
Posts: 16
Country: New Zealand

My program just stops working

I have written a C# program which reads and write to ACT database. This was developed on my machine which has a trial version of ACT 11 installed (Not enough license).

 

Within the trial period, my program works perfectly fine, it can read and write to databases not only on my machine, also to others as well.  I haven't run my program for about 3 weeks since, and now the trial period expired and I tried to run it and it gives errors like "failed login". So I install my C# program on one of the machines that actually has license, and try to connect to database on that machine, but even that is still not working.

 

I am sure the code is correct, because it worked before, all I changed since the last successful run is just added some comments and recompile.

 

So why my code just stops working? is it just because the version on my machine expired ?

 

thanks

Nickel Elite Contributor
Posts: 937
Country: USA

Re: My program just stops working

It's unlikely that the trial expiration would have any impact on your add-in code.  Technically you can compile and add-in without even having ACT1 installed - you just need the referenced assemblies local for a compilation.

 

One thing that might be affected - was your code developed against a different version of ACT! than the target machine where you are trying to test the add-ins?

When you reference an assembly for your add-ins if you strong name that reference your add-in will only work against the same version of that assembly  

 

Also, In general Addins are forward compatible and not backward compatible so if you developed your add-in against v11 I wouldn't expect it to work on a v10 ACT! install.

 

 

Copper Contributor
Posts: 16
Country: New Zealand

Re: My program just stops working

I think I found the problem.

 

When the program was under development it connects to my local ACT database, and it work ok. But right now it connects to a remote database, and it somehow failed to login.

 

The framework.LogOn() statement is placed within a TransactionScope, once I remove the TransactionScope and it works again!

 

So this leads me to think that we can't log on to a remote ACT database when inside a TransactionScope ?

Copper Elite Contributor
Posts: 95
Country: USA

Re: My program just stops working

Yes, since logging on doesn't need a rollback, put your logon and logoff calls outside your transaction scope, and all is well.

 

-Nick

Nick Bohne
Effective Solutions, Inc.
Copper Contributor
Posts: 16
Country: New Zealand

Re: My program just stops working

OK, so logon to ACT! within a transaction scope caused the problem, but I remember I successfully logon to my local ACT! database within a transaction scope before. I will try to reproduce that.