dotConnect for Oracle Documentation
In This Topic
    Samples Overview
    In This Topic

    dotConnect for Oracle samples are divided into 6 categories: General demos, Entity Framework samples, LinqConnect samples, Web demos, Web Service sample, and CRM demo project. You can open all of them from the Start menu group. The General samples demonstrate how to work with components, classes, technologies, and also the usage of individual data access features, Web samples show how to use dotConnect for Oracle in ASP.NET environment, and the CRM demo shows some good design and implementation practices that you can employ with dotConnect for Oracle.

    Note: in the Standard, Mobile, and Express editions of dotConnect for Oracle some samples are not available.

    General Samples

    General samples are demos that demonstrate working with dotConnect for Oracle classes, components, and technologies.

    Use the Start menu group to open General samples in the language you prefer. You can also run the compiled binary, which incorporates all General samples and provides quick access to C# source, necessary SQL scripts, and run-time state.

    Sample Description
    Alerter This sample shows how to transfer messages between connections or client applications with the OracleAlerter component.
    Note: this sample is available only in Professional Edition.
    Array This sample project demonstrates working with data of Oracle VARRAY data type. The sample uses OracleDataReader to get OracleArray object that represents an Oracle collection (VARRAY).
    ArrayBind This sample project demonstrates usage of the array bind feature that allows execution of several SQL statements at once.
    Blob This sample project demonstrates working with Oracle BLOB data type. The sample shows how to get binary data from the table, change BLOB fields using UPDATE statement, and insert a new record by executing a stored procedure with a parameter of BLOB type.
    Clob This sample project demonstrates working with Oracle CLOB data type. The sample shows how to get characters stream from the table, change CLOB fields using UPDATE statement, and insert a new record by executing stored procedure with a parameter of CLOB type.
    Crystal This sample project demonstrates using dotConnect for Oracle for generating reports with Crystal Reports. Be aware that this project requires Crystal Reports, which is no longer included with Visual Studio 2010 and higher. You have to download and install Crystal Reports separately: http://scn.sap.com/docs/DOC-7824 . Then update references to the CrystalDecisions.* assemblies and rebuild the solution.
    CursorField This sample project demonstrates how to work with CURSOR type fields in queries. The sample uses OracleDataAdapter to fill a dataset with data from such queries. The data of CURSOR type fields is represented at dataset as a separate table connected by master-detail relation with the base table.
    DataReader This sample project demonstrates using OracleDataReader class to obtain data from a query. The sample executes SQL statement at the OracleCommand and gets OracleDataReader to retrieve data.
    DataSet This sample project demonstrates using untyped dataset with dotConnect for Oracle to review and update data. The sample uses OracleDataAdapter to fill a dataset and post updated data to Oracle database. OracleDataAdapter uses OracleCommandBuilder class to automatically generate SQL queries for INSERT/UPDATE/DELETE operations.
    DbDataTable This sample project demonstrates data mapping from Oracle tables and paginal access. The sample uses OracleDataTable component to access data from a table and display this data in the DataGrid control.
    Note: the sample is available only in Professional Edition.
    Dependency The Dependency demo project illustrates how to use the data dependency technique. The sample watches for some tables in the database. As you modify their data, the name of the table being edited is shown in a list.
    Note: this sample is available in Professional and Standard Edition.
    Geometry This sample project demonstrates using OracleObject class with custom Oracle types.
    Loader This sample project demonstrates working with the OracleLoader component. OracleLoader's work is based on generation of INSERT statements that insert data by several rows for one time.
    Note: this sample is available only in Professional Edition.
    Long This sample project demonstrates working with Oracle LONG data type. The sample shows how to get character strings from the table, change LONG fields using an UPDATE statement, and insert a new record by executing a stored procedure with a parameter of LONG type.
    MasterDetail This sample project demonstrates setting master-detail relation at the untyped dataset. The sample fills two tables in a dataset using OracleDataAdapter and sets master-detail relation between them.
    MetaData This sample project shows how to retrieve information about databases, tables, columns, users, and so on. The only method used for these tasks is GetSchema.
    MultiCursor This sample project demonstrates filling DataSet with several tables from an OracleCommand that contains a number of parameters of REF CURSOR type.
    NestedTable This sample project demonstrates how to work with nested tables using dotConnect for Oracle. The sample fills a dataset with data from a nested table in a query. The nested table data is represented as a separate table associated with the base table. This is similar to representing a query with CURSOR fields.
    Object This sample project demonstrates using Oracle object types with OracleDataReader component. The sample gets an OracleObject instance from the OracleDataReader, demonstrates working with the attributes and getting attributes values.
    ObjectDataSet This sample project demonstrates how to work in dotConnect for Oracle with untyped dataset to retrieve and update data of Oracle object type. Object attributes are represented at dataset as separate DataTable columns. The sample uses OracleDataAdapter to fill dataset and flush updated data to the server.
    ObjectView This sample demonstrates ability to show OracleObject in a DataGrid component. It illustrates how to show an OracleObject as a field of a table and as a separate object.
    Note: this sample is available only in Professional Edition.
    Pictures This sample project demonstrates using dotConnect for Oracle for working with BLOB objects as graphics. The sample demonstrates how to retrieve binary data from Oracle database and display it at the monitor, load and save pictures into the file and the database.
    Pipe This sample demonstrates usage of OraclePipe component that allows transferring data between connections or client applications. The OraclePipe component represents Oracle pipes supplied by DBMS_PIPE package.
    Note: this sample is available only in Professional Edition.
    PlSqlTable This sample project demonstrates working with parameters of PL/SQL Table type, which is similar to arrays in programming languages such as C#.
    Queue This sample illustrates usage of the Oracle Advanced Queuing (AQ) technology.
    Note: this sample is available only in Professional Edition.
    RefCursor This sample project demonstrates filling a DataSet from the parameter of REF CURSOR type by calling Fill method of an OracleDataAdapter object.
    Refs This sample project demonstrates using REF data type in queries.
    StoredProc This sample project demonstrates how to execute a stored procedure and view modified data.
    Table This sample project demonstrates data mapping from Oracle tables. The sample sets CommandType property of OracleCommand to TableDirect to access data from the table.
    Transactions This sample project demonstrates working with Oracle transactions in dotConnect for Oracle. The sample demonstrates how to get an OracleTransaction object from an OracleConnection object, how to commit or rollback a transaction.
    XMLType This sample demonstrates how to manage XML data in Oracle tables.

    Note: before running sample projects from an IDE you need to execute commands from Program Files\Devart\dotConnect\Oracle\Samples\tables.sql to create test data. If C++ projects fail to open, it is possible that you do not have the assemblies Devart.Data.Oracle.dll and Devart.Data.dll in GAC or project's folder.

    Web Samples

    Run InstallWebTables.sql script by default located in the Program Files\Devart\dotConnect\Oracle\Web\ASP.NET 2\InstallWebTables.sql. Use the Start menu group to open Web samples in the language you prefer.

    Sample Description
    AjaxDemo This sample demonstrates data binding and editing in an asynchronous way. The sample uses OracleDataSource component in conjuction with ASP.NET AJAX Update Panel.
    Note: this sample is available only in Professional Edition.
    CRM This sample demonstrates how OracleDatasource can be used in the complex software product such as CRM (Customer Relationship Management).
    The sample illustrates how to perform data retrieving and editing in the complex scenario using OracleDataSource. This sample is based on the CRM_DEMO database.
    Note: this sample is available only in Professional Edition.
    DataSource This sample shows how to use the OracleDataSource component of dotConnect for Oracle. The sample illustrates using of manual paging, auto paging and master-detail techniques with OracleDataSource component.
    Note: this sample is available only in Professional Edition.
    DataSource_devExpress This sample demonstrates using OracleDataSource with DevExpress ASPxGridView component. The ASPxGridView component uses OracleDataSource to perform asynchronous data retrieving and paging.
    Note: this sample is available only in Professional Edition.
    LoadOnDemand This sample demonstrates the load-data-on-demand technique with the dotConnect for Oracle components.
    The sample shows how to use OracleDataSource and ObjectDataSource to retrieve data from DB asynchronously and only on user demand.
    Note: this sample is available only in Professional Edition.
    LoadOnDemand_Telerik This sample demonstrates load-data-on-demand technique with OracleDataSource component in conjuction with Telerik RadGrid control.
    Note: this sample is available only in Professional Edition.
    Web A sample on simple usage of dotConnect for Oracle in an ASP.NET application.
    WebProviders This sample shows how to use dotConnect for Oracle with ASP.NET Providers Model. The sample illustrates using of WebPart, WebEvent, SessionState, Membership, Role, Profile and SiteMap providers.

    The first part of the WebProviders sample illustrates usage of WebParts, SiteMap, WebEvent, and SessionState Providers, and the second - of Membership, Roles, and Profile Providers.
    Note: this sample is available only in Professional Edition.

    Entity Framework Samples

    Use the Start menu group to open Entity framework samples in the language you prefer. To run the samples you should have VisualStudio 2008 Service Pack 1 or later and .NET Framework 3.5 Service Pack 1 or later installed.

    Besides, to get more experience you can download the separate Entity Framework Query Samples package from our site.

    Note: these samples are available only in Professional Edition.

    Sample Description
    LinqQueries This sample shows the ways of executing LINQ to Entities queries.
    MasterDetail This sample shows how to setup master/detail relationship with the possibility of editing and saving bound entities.
    SaveChanges This sample shows data binding, the possibility of editing table entities collection in DataGridView, and saving the changes to database.

    Note: before running sample projects from an IDE you need to execute commands from crm_demo.sql to create test data. Oracle database version 9.2.0.4 or higher should be installed on the server.

    LinqConnect Samples

    LinqConnect samples are an easy way to get started with LinqConnect applications. They demonstrate usage of Entity classes, Language-Integrated Queries, database operations within LinqConnect. These samples are based on the CRM_DEMO database.

    Use the Start menu group to open samples in the language you prefer.

    Note: these samples are available only in Professional Edition. You can get more detailed information on the LinqConnect samples in the ReadMe file by the following path - Program Files\Devart\dotConnect\Linq\Samples\Readme.html

    Web Service

    Sample Description
    Server This sample illustrates creating a web service with dotConnect for Oracle. In the provided web method dotConnect for Oracle classes are used to fill DataSet and return it to a client.
    WebClient This sample demonstrates using of the web service by the web client. The data recieved from web service is shown in GridView control.
    WinClient This sample demonstrates using of the web service by the WinForms client. The data recieved from web service is shown in the DataGridView control.

    CRM Demo

    CRM (Customer Relationship Management) is a widespread class of projects in which you can encounter many typical tasks of database applications development. This sample shows how these tasks can be resolved in the scope of approaches that are offered by dotConnect for Oracle data access solution for designing and building WinForms applications. By examining the source code of CRM demo you can see how the advanced features of dotConnect for Oracle help you build a centralized data access and storage solution. Particularly, it solves common problems like implementing flexible data binding, passing instances of data access components, controlling database connections, and so on. For more information on the best practices in the area of data access please refer to the General Concepts in Database Application Development section of dotConnect for Oracle documentation.

    To see how it works launch the compiled binary from the Start menu. This sample is based on the CRM_Demo database.

    Note: this demo is available only in Professional Edition. Also there is similar demo for ASP.NET; more detailed information on it is provided in the Web samples section.