Webgrid throwing exception connection to Oracle Database

1 reply. Last post: September 4, 2014 11:02 PM by Hans Kristian
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

I have a webgrid control on my page that is using SqlDataSource to connect to an Oracle database.

The connection string to the oracle database is setup in the web.config, as seen below:

<add name="RPW" connectionString="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.50.240)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=STGSAFR)));User Id=expr_master;Password=Frontier_6;" providerName="Oracle.ManagedDataAccess.Client"/>

The SqlDataSource is defined as:

<asp:SqlDataSource ID="sqlRPWReports" runat="server" ConnectionString="<%$ ConnectionStrings:RPW %>" SelectCommand="SELECT * FROM [RPWReportHeader] ORDER BY ReportName" ProviderName="<%$ ConnectionStrings:RPW.ProviderName %>" ></asp:SqlDataSource>

The Webgrid is defined as :

<ISWebGrid:WebGrid ID="WebGrid1" runat="server" DataSourceID="sqlRPWReports" Height="350px" UseDefaultStyle="True" OnInit="WebGrid1_Init" OnButtonClick="WebGrid1_RebindData" Width="100%" DefaultStyleMode="Win7"> <LayoutSettings AllowAddNew="No" ColumnFooters="Yes" AllowDelete="No" AllowColumnMove="Yes" AllowEdit="No" AllowExport="Yes" AllowFilter="No" AllowGrouping="Yes" AllowSelectColumns="Yes" AllowSorting="Yes" EditOnClick="False"> </LayoutSettings> <RootTable DataKeyField="ReportId"> <SortedColumns> </SortedColumns> <Columns> <ISWebGrid:WebGridColumn Caption="Report Id" Visible="false" DataMember="ReportId" Name="ReportId" EditType="NoEdit" Width="150px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Report Name" DataMember="ReportName" Name="ReportName" Width="150px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Owner" DataMember="Owner" Name="Owner" Width="150px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="Category" DataMember="Category" Name="Category" Width="150px"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </ISWebGrid:WebGrid>

When running the page I get the following exception:

chris21 ExpressReports encountered a fatal error causing process to stop - error is : System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed. at
System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) at System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactory() at
System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactorySecure() at System.Web.UI.WebControls.SqlDataSource.CreateConnection(String connectionString) at
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
DataSourceViewSelectCallback callback) at ISNet.WebUI.DataSourceInfo.PerformSelect() at ISNet.WebUI.WebGrid.WebGridDataSourceInfo.PerformSelect() at ISNet.WebUI.DataSourceInfo.DataBind() at
ISNet.WebUI.DataSourceInfo.EnsureDataBound() at ISNet.WebUI.DataSourceInfo.set_RequiresDataBinding(Boolean value) at ISNet.WebUI.WebGrid.WebGrid.?(Boolean) at ISNet.WebUI.WebGrid.WebGrid.() at
ISNet.WebUI.WebGrid.WebGrid.OnInitializeDataSource(Object dataSource) at ISNet.WebUI.WebGrid.WebGrid.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Any assistance would be great.

Thanks.

All times are GMT -5. The time now is 8:08 AM.
Previous Next