Question

I have a several Advantage Extended Procedures written in the .NET and running on my Advanced Database Server. Right after I make the first call to the SP, the .NET assembly becomes locked. I need to update the assembly with a new version. The only way up to this moment I have found - the restart of the ADS. This is absolutely uncomfortable. Is there are some other way to unlock my assembly?

Was it helpful?

Solution

The easiest way to test/debug an Advantage Extended Procedure (AEP) is to use Advantage Local Server (ALS) which will be loaded each time you run your test application and unloaded when the test application is terminated.

When using Advantage Database Server (ADS) you must ensure that any clients using the stored procedure are disconnected. Advantage keeps the DLL in memory until all the connections that have used the stored procedure are closed. If you terminate your test application abnormally the server does not know that the application has closed. The connection will be cleaned up by the server if the client does not respond within the client timeout setting, defaulted to two minutes.

You can also start ADS as an executable using the /EXE switch as a part of your debugging. This can automatically start and stop ADS when you are debugging your AEP. However, you will need to start a test application separately when using this method.

Additionally you should disable DLL Caching by calling the ADS_DD_DISABLE_DLL_CACHING system procedure prior to debugging AEPs. By default ADS makes a copy of the DLL containing your stored procedure(s) and checks for newer versions when the DLL is accessed. Disabling this feature ensures that you are always using the latest version of the DLL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top