Use Oralce Object For OLE 2.3 to connect to Oracle 8 in ASP. NET (C #)

Source: Internet
Author: User


1. Add reference: Interop. OracleInProcServer in the WEB application project.
2. Web. config Configuration:
<Configuration>
<Deleetask>
 
<! -- Database connection information configuration -->
<Add key = "Data Source" value = "DB"/>
<Add key = "User ID" value = "USER"/>
<Add key = "Password" value = "000000"/>
<Add key = "Max Pool Size" value = "100"/>
<Add key = "Min Pool Size" value = "0"/>
<Add key = "Pooling" value = "true"/>
 
</AppSettings>
......
3. Create an OracleSession object in Global. asax. The Code is as follows:
Using System;
Using System. Collections;
Using System. ComponentModel;
Using System. Web;
Using System. Web. SessionState;
Namespace SparePart
{
/// <Summary>
/// Summary of Global.
/// </Summary>
Public class Global: System. Web. HttpApplication
{
/// <Summary>
/// Required designer variables.
/// </Summary>
Private System. ComponentModel. IContainer components = null;
Static public OracleInProcServer. _ OraSessionClassClass OraSession;
Static public OracleInProcServer. OraDatabase OraDataBase;
Public Global ()
{
InitializeComponent ();
}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.