Can you show me what the syntax looks like for your calls to SQLite?
I am not familiar with this product although the description states that it is accessed via callable C library which means that it can certainly be called from COBOL.
So you are using an ADO.NET data provider for SqlLite. You can trap errors in managed code by wrapping your statements in try...catch blocks.
Example:
try set myConnection to new SqlConnection(myConnectString) invoke myConnection::Open catch ex as type Exception display ex::Message end-try
If any error occurs then the statements between the catch and the end-try will be executed. If no error occurs then they will not.
Please see the documentation for the Try statement here.
Have you tried to use this ADO.NET provider with OpenESQL?
If it worked (I have never tested it), then it would allow you to use standard embedded SQL statements within your COBOL so you would not have to code the OO calls directly.
== Have you tried to use this ADO.NET provider with OpenESQL?
No, how do this?
=== If it worked (I have never tested it), then it would allow you to use standard embedded SQL statements within your COBOL so you would not have to code the OO calls directly.
How you interface to the ADO.NET APi's is really a matter of personal preference.
If you are comfortable coding using object-oriented COBOL and accessing the ADO.NET classes directly then this is certainly a viable solution.
If however, you are accustomed to using procedural COBOL with embedded SQL statements using EXEC SQL ...END EXEC or if you have existing applications that already use EXEC SQL then you might want to look at using OpenESQL with the DBMAN=ADO directive.
We have tested the DBMAN=ADO with ADO.NET providers for SQL Server, Oracle, DB2 and others but I have never tried with the SQLLite provider.
Open up the ADO.NET Connection Editor from Visual Studio IDE-->Tools-->Micro Focus COBOL and look under the providers tab.