Hello Allan,
we've had a similar problem. We solved it using C# and reflection. We're looking for an assembly and loading it at runtime. Then we're using reflection to get the type of the SAProviderFactory. This type has a function CreateConnection which returns an Instance of a DbConnection. You would have to change your program to use DbConnection instead of SaConnection.
Hope that helps
Kind regards
Oliver Albrecht
DATAflor AG