ADO.NET Drivers
SQL support in the PPJ Framework is entirely based on the abstract interfaces that are part of the ADO.NET specifications. Therefore, the PPJ Framework is fully driver independent and can work with any compliant ADO.NET driver, including the drivers for OLEDB, ODBC, Sql Server and Oracle that are already available in the basic .NET Framework.
Additionally, the specialized SqlOra* functions can work with both Oracle ODP ADO.NET driver or Microsoft's Oracle ADO.NET driver. The only limitation is that to pass array parameters and receive array parameters to stored procedures you have to use Oracle's ODP driver.
Various peculiarities in the specific ADO.NET driver can be configured in the sql.config file or set programmatically using the PPJ.Runtime.Sql.SqlProperty class.
Since the PPJ is driver independent and a minimally compliant ADO.NET driver can be implemented directly in .NET, it is possible to easily add fully custom drivers to an application.
Exposing ADO.NET objects
The SalSqlHandle and SalSqlSessionHandle types expose their inner ADO.NET objects through few and simple properties.
You can access the internal ADO.NET objects using the following members exposed by SalSqlHandle:
Connection
The instance of System.Data.IDbConnection corresponding to the Sql Handle. When the multiple connection option is off (default) and for connections using the same user/password, multiple Sql Handle instances share the same IDbConnection object.
Command
The instance of System.Data.IDbCommand corresponding to the statement that has been prepared or executed.
DataReader
The instance of System.Data.IDataReader that is connected to the database and returns the result set generated by the last executed statement. It's null when ResultSet mode is on.
DataSet
The instance of System.Data.DataSet populated with the entire result set generated by the last executed statement. It's null when ResultSet mode is off.
You can access the internal ADO.NET objects using the following members exposed by SalSqlSessionHandle:
Connection
The instance of System.Data.IDbConnection corresponding to the Sql Session Handle.
Error Codes
Error codes returned by the PPJ Framework are the original codes returned by the database to the ADO.NET layer. This is different from SQLWindows/Team Developer behavior, which adds a certain predefined constant to the error code returned by the database. I.e., if Oracle return 01017, Gupta changes it to 21017.
Last updated