Forum:  LLBLGen Pro Runtime Framework

Thread:  How to disable automatic RecoveryStrategy for specific query

Rosacek (User)   Posted on: 06-May-2019 18:16:24.
I use Adapter v4.2 and 5.5

I override method CreateRecoveryStrategyToUse in DataAdapter to use recovery strategy automatically.

But now I have query where I do not want to use recovery strategy and I cannot find an easy way how to temporary disable "global" strategy for particular query.

The only way I found is to instantiate RecoveryStrategy having maxRetries=0 and set it to adapter.ActiveRecoveryStrategy but this is overkill.
Walaa (Support Team)   Posted on: 06-May-2019 23:54:03.
Why don't you derive from Data Adapter, where you override the method.
Use the derived class when you need the Recovery Strategy, and use the base class where you don't need it.

Rosacek (User)   Posted on: 07-May-2019 08:29:28.
I derive from dataadapter.

Looks there is no simple way how to disable recovery strategy.
Ok I will live with it.
Otis (LLBLGen Pro Team)   Posted on: 07-May-2019 09:13:34.
It's indeed not a turn-key solution, we'll see what we can do about that in the future.

Otis (LLBLGen Pro Team)   Posted on: 06-Mar-2020 11:41:04.
Implemented in v5.7