Embedded SQL Application Development in C#

This article is only applicable to .NET Framework 4.x. eXtremeDB for .NET 5 and later is documented in the eXtremeSQL C# API for .NET Core articles.

As explained in the C# application development page, a C# application will define its database schema as native C# classes with the [Persistent] attribute, then specify optional support libraries in the Database constructor call. Memory devices and database parameters are specified in the Database.Parameters object and Database.Device array passed to the Open() method of class Database. The difference in eXtremeSQL applications is that instead of a Connection object, a SqlLocalConnection or SqlRemoteConnection is instantiated by Database method ConnectSql() to initialize the SQL engine which is then used for all SQL database access through methods ExecuteQuery() and ExecuteStatement().

Processing SQL Queries

The classes SqlResultSet and SqlTuple are provided for processing query results. Typically a SqlResultSet will be instantiated by calling ExecuteQuery() with a select statement; then a foreach loop will be used to iterate the result set. The SqlTuple class is used to process the current result set row.

Executing SQL Statements

The ExecuteStatement()method is called with an insert, update or delete statement to modify database contents.

eXtremeSQL Application Implementation Details

Please use the links in the table below for implementation examples:

Example A simple C# application example
Misc Details Miscellaneous C# implementation details
Transactions Managing SQL transactions in C#
SqlAggregator Instructions for using the SqlAggregator class