473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Oracle Provider Comparison

Hello,

I'm creating a web app that needs to provide some simple, read-only
access to an Oracle database using SELECT statements. What I am
curious about is which provider (System.Data.OracleClient or ODP.NET)
would be a better using in this instance. The Oracle database itself
resides on a remote server hosted by our parent company across a WAN
connection, so, there is a network efficiancy concern.

The other problem I am having with respect to this app is that I am no
able to get a paramaterized SqlDataSource to work with the ODP.NET
provider. Trying to use the provider returns no results. Using the
included .NET provider (with no modifications to the SqlDataSource)
does not have any problems and returns the results as expected.
Example:

<asp:SqlDataSource ID="CustomersDS" runat="server"
ConnectionString="<%$ ConnectionStrings:OracleConn %>"
ProviderName="<%$ ConnectionStrings:OracleConn.ProviderName %>"
SelectCommand="SELECT CUSTOMER_NUMBER, CUSTOMER_NAME FROM
CUSTOMERS_V WHERE CUSTOMER_NUMBER LIKE :x AND CUSTOMER_NAME LIKE :y"
SelectCommandType="text">
<SelectParameters>
<asp:ControlParameter Name="x" ControlID="CustID"
PropertyName="Text" />
<asp:ControlParameter Name="y" ControlID="CustName"
PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
<asp:GridView ID="CustomersGrid" runat="server"
AutoGenerateColumns="false" DataSourceID="CustomersDS"
DataKeyNames="CUSTOMER_NUMBER"
OnRowCommand="CustomersGrid_RowCommand">
<Columns>
<asp:BoundField HeaderText="Customer ID"
DataField="CUSTOMER_NUMBER" ConvertEmptyStringToNull="false" />
<asp:BoundField HeaderText="Name" DataField="CUSTOMER_NAME"
ConvertEmptyStringToNull="false" />
<asp:ButtonField ButtonType="Button" Text="Select"
CommandName="SelectCustomer" />
</Columns>
</asp:GridView>

Your thoughts are greatly appreciated.
Thanks,
Evan

Apr 2 '07 #1
1 1744
Evan M. wrote:
Hello,

I'm creating a web app that needs to provide some simple, read-only
access to an Oracle database using SELECT statements. What I am
curious about is which provider (System.Data.OracleClient or ODP.NET)
would be a better using in this instance. The Oracle database itself
resides on a remote server hosted by our parent company across a WAN
connection, so, there is a network efficiancy concern.

The other problem I am having with respect to this app is that I am no
able to get a paramaterized SqlDataSource to work with the ODP.NET
provider. Trying to use the provider returns no results. Using the
included .NET provider (with no modifications to the SqlDataSource)
does not have any problems and returns the results as expected.
Example:

<asp:SqlDataSource ID="CustomersDS" runat="server"
ConnectionString="<%$ ConnectionStrings:OracleConn %>"
ProviderName="<%$ ConnectionStrings:OracleConn.ProviderName %>"
SelectCommand="SELECT CUSTOMER_NUMBER, CUSTOMER_NAME FROM
CUSTOMERS_V WHERE CUSTOMER_NUMBER LIKE :x AND CUSTOMER_NAME LIKE :y"
SelectCommandType="text">
<SelectParameters>
<asp:ControlParameter Name="x" ControlID="CustID"
PropertyName="Text" />
<asp:ControlParameter Name="y" ControlID="CustName"
PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
<asp:GridView ID="CustomersGrid" runat="server"
AutoGenerateColumns="false" DataSourceID="CustomersDS"
DataKeyNames="CUSTOMER_NUMBER"
OnRowCommand="CustomersGrid_RowCommand">
<Columns>
<asp:BoundField HeaderText="Customer ID"
DataField="CUSTOMER_NUMBER" ConvertEmptyStringToNull="false" />
<asp:BoundField HeaderText="Name" DataField="CUSTOMER_NAME"
ConvertEmptyStringToNull="false" />
<asp:ButtonField ButtonType="Button" Text="Select"
CommandName="SelectCustomer" />
</Columns>
</asp:GridView>

Your thoughts are greatly appreciated.
Thanks,
Evan
I use the Enterprise Library, and use Oracle's providers to call Oracle
stored PL/SQL procedures with parameters like this:

using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using Microsoft.Practices.EnterpriseLibrary.Common;
try
{
Database db = DatabaseFactory.CreateDatabase("epicurConnMonte");
DataSet dsOracleOutputCursor = new DataSet();
dsReturned =
db.ExecuteDataSet("monte.Pkg_Get_Sets.Proc_Get_Com pare_Set", pNDB_No1,
pNDB_No2, dsOracleOutputCursor);

msgBack = "Food Items dataset was loaded via Oracle call";
recCountBack = dsReturned.Tables[0].Rows.Count;
}

catch
{
msgBack = "datasets were not accessible.";
}

Apr 3 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David Gray | last post by:
Hello all, Having problems connecting to an Oracle 9i database from within SQL/Server 2000 using the Security/Linked Servers feature. Server1 (SQL/Server) ----------- Windows Server 2003,...
5
by: jrefactors | last post by:
My machine is Windows XP with Oracle 9.2 Home; IIS and Oracle are in the same box. I have tried both Oracle OLEDB Provider and Microsoft ODBC For Oracle, but both not working. For Microsoft...
13
by: Chris Botha | last post by:
The machine is running XP Pro with all the latest service packs, etc. I must access an Oracle database so I installed the Oracle client stuff. I can query Oracle from a Windows app, no problem....
8
by: danbredy | last post by:
Hi, I'm attempting to connect to an Oracle database using SQL Server 2005 Express (OS is Windows XP Professional) and having absolutely no luck. Here is the information SQL Plus gives me about...
1
by: Crazy Cat | last post by:
Hi, I created a linked server for MS SQL Server 2005 Express to an Oracle database using the OLE DB Provider for ODBC. My ODBC Source uses the Microsoft ODBC for Oracle driver. I'm using the...
9
by: D. Patrick | last post by:
I need to connect to an Oracle database. I've never done it before. I see that with framework 1.1 you had to download ODP.NET from Oracle's site in order for the framework classes to even work....
1
by: =?Utf-8?B?Ym9va2VyQG1ndA==?= | last post by:
Hopefully, I frame this problem/question correctly. I have some code written/updated in visual studio 2003. This code when setup on other machines where I have installed the Oracle 9i client,...
2
by: Vinod Sadanandan | last post by:
All, Below listed are the new features in Oracle 11g ,please join me in this discussion to generate a testcase and analyze each of the listed features . Precompilers:...
3
by: Dom | last post by:
Someone in a post mentioned the Oracle Data Provider. Can anyone tell me about it? I'd like to know the following: 1. Is it much faster than OleDB? 2. Is it essentially the same approach,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.