ODP.NET Developer’ s Guide by Jagadish Chatarji Pulakhandam Sunitha Paruchuri A practical guide for developers working with the Oracle Data Provider for .NET and the Oracle Developer Tools for Visual Studio 2005 Application development with ODP.NET Dealing with XML DB using ODP.NET Oracle Developer Tools for Visual Studio .NET Read...
ODP.NET - Fundamental ODP.NET Classes to Retrieve Data To retrieve data from an Oracle database using ODP.NET we need to work with a few of the ODP.NET classes. At this point we will discuss the most fundamental classes available in ODP.NET for retrieving data. The following is the list of fundamental ODP.NET classes OracleConnection...
ODP.NET - Retrieving Data Using OracleDataReader OracleDataReader is simply a read-only and forward-only result set. It works only if the database connection is open and it makes sure that the connection is open while you are retrieving data. As the data that it retrieves is read-only it is a bit faster than any other method to retrieve data from...
ODP.NET - Retrieving Multiple Rows on to the Grid In the previous section we tried to retrieve only one row using OracleDataReader. In this section we will try to retrieve more than one row or a result set and populate a DataGridView on a WinForm. The following code lists out the details of all employees available in the emp table geshibot...
ODP.NET - Retrieving Typed Data While retrieving values from OracleDataReader we can extract information available in individual columns of a particular row either by using column ordinal position values or column names. Retrieving Typed Data Using Ordinals ODP.NET provides data-specific enumerations through the namespace oracle. DataAccess.types....
ODP.NET - Filling a DataTable Using OracleDataReader So far we have been filling data tables using OracleDataAdapter. ADO.NET 2.0 gives us the flexibility to fill a data table using OracleDataReader as well. The following code gives you the details of all employees available in the emp table by filling a data table using an OracleDataReader geshibot...
ODP.NET - Retrieving a Single Row of Information Using OracleDataAdapter In the previous example we worked with a set of rows in the DataTable object. Now we shall work with a particular row using the DataTable object. The following code accepts an employee number from the user and gives you the details of that employee geshibot language vb.net Imports...
ODP.NET - Working with DataTableReader DataTableReader is complementary to a DataTable object and is mainly used as a type of Data Reader in the disconnected mode. The following is the modified code geshibot language vb.net create connection to db Dim cn As New OracleConnection Data Source xe; _...
ODP.NET - Populating a Dataset with a Single Data Table A dataset is simply a group of data tables. These data tables can be identified with their own unique names within a dataset. You can also add relations between data tables available in a dataset. The following code gives you the details of all employees available in the emp table by populating...
ODP.NET - Populating a Dataset with Multiple Data Tables Now let us add more than one data table into a dataset The following code retrieves a list of department details into a data table named Departments and another list of employee details into a data table named Employees geshibot language vb.net Imports Oracle.DataAccess.Client Public Class Form7...
ODP.NET - Presenting Master-Detail Information Using a Dataset As mentioned before a DataSet object can have its own relations between data tables existing in it. We can add these relations dynamically at the client side within an application to represent master-detail or hierarchical information. The following code gives the list of employees...
ODP.NET - More About the OracleCommand Object Till now we have seen OracleCommand working with OracleDataReader. OracleCommand is not simply meant for OracleDataReader. It has got a lot of functionality for itself. Let us see few of the most commonly used features of OracleCommand in this section. We will further go into depth in subsequent sections...
ODP.NET - Handling Nulls when Executing with ExecuteScalar The most important issue to remember is that ExecuteScalar simply returns an object type of data. The object refers to any data type within .NET. If the data type of your variable matches with the type of object returned by ExecuteScalar an implicit automatic conversion takes place. There...
ODP.NET - Handling Nulls when Working with OracleDataReader When we work with OracleDataReader or for that matter even with data rows in a data table we may come across nulls. The following is the efficient way to deal in with such scenarios geshibot language VB.NET create connection to db Dim cn As New OracleConnection Data Source xe;...
ODP.NET - Working with Bind Variables together with OracleParameter With the help of OracleParameter you can include bind variables within any SQL statement. These bind variables are nothing but run-time query parameters. The values in the SQL statement are bound at run time when we use bind variables. If the same SQL statement is being continuously...
ODP.NET - Working with OracleDataAdapter together with OracleCommand In the previous examples we worked with OracleDataAdapter by directly specifying SQL statements. You can also pass OracleCommand to OracleDataAdapter. This is very useful if you deal with stored procedures covered in Chapter 5 or bind variables together with OracleDataAdapter. The...
ODP.NET - Techniques to Improve Performance while Retrieving Data Performance tuning is a great subject in Oracle. Volumes of books would not be enough to cover every aspect of performance tuning in Oracle. However in this section we will only discuss the fundamental performance techniques while working with ODP.NET. Some of the frequently used...