SQL support in the PPJ Framework is one of its strongest areas. It's fully driver independent and it relies on standard ADO.NET interfaces. It can work in two modes: Connected and Disconnected. The disconnected mode corresponds to having the ResultSet mode enabled in CTD. Bind and into variables and expressions are also fully supported and executed extremely fast.
CTD used the SQL.INI file to associate a data source name to a particular database. We use the sql.config file (in XML format) to associate a data source name to a specific ADO.NET driver and connection string. See Configuration.
When ResultSet mode is off, the SQL layer in the PPJ Framework uses the fast ADO.NET's DataReader objects to scroll the result set, forward only. This is the connected mode and requires the connection to the database to be kept alive.
When ResultSet mode is on, the PPJ Framework uses ADO.NET's DataSet class to load the entire result set in memory (which also allows the code to scroll the result set backward) when the statement is executed.
The PPJ Framework is ready for both ADO.NET drivers, the ones that support MARS and the ones that don't. When an ADO.NET driver supports MARS, it is possible to execute "nested" sql statements without losing the previous result set. When MARS is not supported, it can be simulated by turning ResultSet mode on, or my enabling the multiple connection flag.