I'm asking this as a follow-up to my previous question: http://stackoverflow.com/questions/3221364/what-is-a-good-way-of-accessing-dbase-files-using-bde-and-delphi
It was suggested that I called upon a Delphi COM server instead of passing data though standard input/output, and I totally agree that such a solution is very limited.
Basically I need a way to call BDE from C#, without using ADO/OLEDB. Origianlly my requirement was having the ability to execute queries directly and having some sort of RecordSet object returned, but I'm also okay with a strongly typed interface with method such as:
uint CreateCustomer(string fname, string lname, string addr, string email) uint CreateContract(...) bool DeleteContract(...)
I would prefer not having to register a COM server with regsvr32, but rather use Interop and DllImport to call DLL methods directly. Using the latter approach, are there any special considerations with regards to resource cleanup and "BDE Sessions" and what not.
Also, what would be the proper way to handle exceptions and ensure any BDE (or other) resources are freed if exceptions occur?
I have a lot of questions, and I'm not really sure how to present them in a clear way :)
EDIT: I'm fully aware that BDE is 'dead', but I have no control whatsoever over the third-party software that's still using BDE.