I am trying to figure out if this is at all possible.
What I want to achieve is the following
1- Open a SqlConnection in C#
2- Insert/Update/Delete some data
3- Handover control to teh Delphi Plugin, which should use the same SqlConnection
4- The Delphi Plugin can do some work
5-Close the SqlConnection
There is a basic requirement:
If any error occurs either in the host or in the plugin a rollback should occur. So all work done should be undone in that case. So the plugin will return either an exception or an errorcode so that the calling process can perform a rollback on the active SqlConnection
So the question is, can I pass an active/open SqlConnection with an associated active transaction from a C# host to a Delphi Plugin and be able to use that same connection?