CrystalNet 4 Posted September 20, 2019 ADO.Net DAC for Delphi is the fastest and most reliable database connectivity solutions for any database using ADO.Net technology in Delphi. It provides data access to data sources such as SQL Server, Oracle, SQLite, VistaDB and to data sources exposed through OLE DB and ODBC using ADO.Net data provider framework. ADO.Net DAC for Delphi is an enterprise solution with highest performance and unlimited possibilities. Data-sharing consumer applications can use ADO.NET DAC for Delphi to connect to these data sources and retrieve, handle, and update the data that they contain. With its powerful common architecture base on ADO.Net technology, ADO.Net DAC for Delphi enables high-speed direct data access from Delphi to SQL Server, Oracle, SQLite, VistaDB and other data sources exposed through OLE DB and ODBC. ADO.Net DAC for Delphi provides a library of components for connecting to a database, executing commands, and retrieving results. Those results are either processed directly, placed in a Virtual Table components. The Virtual Table component can also be used independently of any active connection to manage data local to the application or sourced from XML. You have the choice of either using client-side or server-side cursors. The ADO.Net DAC for Delphi actually handle the work of cursors. The developer has the freedom of choice in development, for creating efficient applications. The ADO.Net DAC for Delphi consists of the following Data Access library components: SqlClient Data Access Components OracleClient Data Access Components SQLite Data Access Components ODBC Data Access Components OLE DB Data Access Components VistaDB Data Access Components Virtual Table Components Note: Direct Data Access components for the following data sources will be available in future: MySQL, Firebird, BD2, Informix etc. However, you can still connect to these data sources using ODBC Data Access Components or OLE DB Data Access Components provided ODBC drivers or OLE DB providers are installed on the client machine. SqlClient Data Access Components SqlClient Data Access Components (SqlClientDAC) is a feature-rich and high-performance library of components that provides native connectivity to SQL Server from Delphi for both 32-bit and 64-bit Windows platforms. SqlClientDAC-based applications connect to SQL Server directly through the ADO.Net SqlClient, which is a .NET Framework Data Provider for SQL Server. SqlClientDAC aims to assist programmers in developing of fast and native SQL Server database applications. SqlClientDAC uses its own protocol to communicate with SQL Server and it is lightweight and performs well because it is optimized to access a SQL Server directly without adding an OLE DB or Open Database Connectivity (ODBC) layer. For more information go to https://crystalnet-tech.com/ADONetVcl/SqlClientDAC. OrcaleClient Data Access Components OracleClient Data Access Components (OracleClientDAC) is a feature-rich and high-performance library of components that provides native connectivity to Oracle from Delphi for both 32-bit and 64-bit Windows platforms. OracleClientDAC-based applications connect to Oracle directly through the ADO.Net OracleClient, which is an Oracle Data Provider for .NET (ODP.Net). OracleClientDAC aims to assist programmers in developing of fast and native Oracle database applications. OracleClientDAC allows developers to take advantage of advanced Oracle database functionality, including Real Application Clusters, self-tuning statement cache, and fast connection failover. For more information go to https://crystalnet-tech.com/ADONetVcl/OracleClientDAC. SQLite Data Access Components SQLite Data Access Components (SQLiteDAC) is a feature-rich and high-performance library of components that provides native connectivity to SQLite from Delphi for both 32-bit and 64-bit Windows platforms. SQLiteDAC-based DB applications are easy to deploy, do not require installation of other data provider layers (such as BDE or ODBC), and that's why they can work faster than the ones based on standard Delphi data connectivity solutions. SQLiteDAC-based applications connect to SQLite directly through the SQLite.Net, which is an ADO.NET provider for SQLite. For more information go to https://crystalnet-tech.com/ADONetVcl/SQLiteDAC.aspx. ODBC Data Access Components ODBC Data Access Components (ODBCDAC) is a feature-rich and high-performance library of components that provides data access for data sources exposed through ODBC from Delphi for both 32-bit and 64-bit Windows platforms. ODBCDAC-based applications connects to any data source exposed through ODBC using the .NET Framework Data Provider for ODBC. ODBCDAC aims to assist programmers in developing of fast and native database applications. ODBCDAC uses the native ODBC Driver Manager (DM) to enable data access. ODBCDAC requires the x86 or x64 ODBC driver to be installed according to ODBC specification. Please see the following ODBC documentation: The portional list of ODBC drivers The ODBC programming guide For more information go to https://crystalnet-tech.com/ADONetVcl/ODBCDAC.aspx. OLEDB Data Access Components OLE DB Data Access Components (OLEDBDAC) is a feature-rich and high-performance library of components that provides data access for data sources exposed through OLE DB from Delphi for both 32-bit and 64-bit Windows platforms. OLEDBDAC aims to assist programmers in developing of fast and native database applications. OLEDBDAC uses native OLE DB through COM interop to enable data access. OLEDBDAC does not support OLE DB version 2.5 interfaces. OLE DB Providers that require support for OLE DB 2.5 interfaces will not function correctly with the OLE DB Data Access Components. This includes the Microsoft OLE DB provider for Exchange and the Microsoft OLE DB provider for Internet Publishing. OLEDBDAC does not work with the OLE DB provider for ODBC (MSDASQL). To access an ODBC data source, use the ODBC Data Access Components. For more information go to https://crystalnet-tech.com/ADONetVcl/OLEDBDAC.aspx. Virtual Table Components Virtual Table Components is a feature-rich and high-performance library of components that provides an in-memory cache of data retrieved from a data source. It offers a disconnected data source architecture which means there is no need of active connections during work with this component. It can be used to hold multiple tables with data. You can select data form tables, create views based on table. The component also provides you with rich features like saving data as XML and loading XML data. For more information go to https://crystalnet-tech.com/ADONetVcl/VirtualTables.aspx. Main Features Direct Mode Allows your application to work with SQL Server, Oracle, SQLite, VistaDB and other data sources through ODBC or OLE DB providers directly without involving a DB Client library, thus significantly facilitating deployment and configuration of your applications. Performance All our components and libraries are designed to help you write high-performance, lightweight data access layers, therefore they use ado.net data access technologies and techniques of optimization. Handling Cursors When a SQL command is executed and it has to return rows, the DBMS creates a cursor on the DBMS server. An application uses the cursor to retrieve rows from a database. There are serveral cursor kinds to choose from using the FetchOptions.CursorKind property. Rowset Fetching Rowset Fetching allows you to specify the number of records that will be fetched from the server in one network round trip. You can optimize this separately for each SELECT statement that you execute, thereby minimizing the number of network round trips by specifying the RowsetSize option. The rowset size is controlled by the FetchOptions.RowsetSize property and the rowsets are fetched according to the FetchOptions.Mode property. DataReader Provider DataReader is used to read the data from database and it is a read and forward only connection oriented architecture when fetching data from database. DataReader will fetch the data very fast when compared to other TCustomClrDataSet descendants. DataAdapter Provider DataAdapter acts as a Bridge between TCustomClrDataSet descendants and database. This dataadapter object is used to read the data from database and bind that data to TCustomClrDataSet descendants. It is a disconnected oriented architecture. IDE Compatibility Our product is compatible with the latest IDE versions: Embarcadero RAD Studio 10.3 Rio. It is also compatible with the previous IDE versions since CodeGear Delphi 2009. DB Compatibility Our product supports the latest versions of the popular database servers like Oracle, SQL Server, SQLite, VistaDB and other data sources (using ODBC and OLE DB providers) such as MySQL, InterBase, Firebird, PostgreSQL etc. Example - using SqlCient Data Access Components The code in this example assumes that you can connect to the Northwind sample database on Microsoft SQL Server. The code creates a TSqlClientDataReader to select rows from the Products table, adding a parameter to restrict the results to rows with a UnitPrice greater than the specified parameter value, in this case 5. The code executes the command using the TSqlClientDataReader, and displays the results in the console window. program SqlClientExample; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, CNClrLib.ADONet.SqlClient; var queryString: string; paramValue: Integer; connection: TSqlClientConnection; reader: TSqlClientDataReader; begin try // Provide the query string with a parameter placeholder. queryString := 'SELECT ProductID, UnitPrice, ProductName from dbo.products ' + 'WHERE UnitPrice > :pricePoint ' + 'ORDER BY UnitPrice DESC'; // Specify the parameter value. paramValue := 5; // Create and open the connection. connection := TSqlClientConnection.Create(nil); try // Setup connectionstring with connection.Params do begin DataSource := '(local)'; InitialCatalog := 'Northwind'; IntegratedSecurity := True; end; // OR you can set sql connectionstring to the connectionstring property of TSqlClientConnection connection.ConnectionString := 'Data Source=(local);Initial Catalog=Northwind;Integrated Security=true'; // Open connection connection.Open; // Create the DataReader command. reader := TSqlClientDataReader.Create(nil); try reader.Connection := connection; reader.CommandText.Text := queryString; reader.ParamByName('pricePoint').AsInteger := paramValue; reader.Open; while reader.Read do begin Writeln(Format(chr(9) + '%s' + chr(9) + '%s' + chr(9) + '%s', [reader.GetString(0), reader.GetString(1), reader.GetString(2)])); end; reader.Close; finally reader.Free; end; finally connection.Free; end; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; ReadLn; end. For more information about these components, go to https://crystalnet-tech.com/ADONetVcl/ADODotNet Share this post Link to post