Click here to Skip to main content
15,896,118 members
Articles / Web Development / ASP.NET

Using Oracle Stored Procedures in SqlDataSource Select Command

Rate me:
Please Sign up or sign in to vote.
4.60/5 (7 votes)
5 Jan 2009CPOL1 min read 69.5K   428   20  
How to use Oracle (and other non Microsoft) SP in SqlDataSource Select command
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {
        ((System.Data.OracleClient.OracleParameter)e.Command.Parameters[0]).OracleType = System.Data.OracleClient.OracleType.Cursor;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Strategic Connections Inc.
Canada Canada
I'm in Toronto now, working for some CRM company....

Comments and Discussions