用ODBC,如:
string DbConnstr="Provider=OraOLEDB.Oracle;Password=tt_passwd;Persist Security Info=True;User ID=tt_user;Data S" + "ource=db.com;ConnectionTimeout=0;Extended Properties=\"\"";OleDbConnection myDbConn = new OleDbConnection(DbConnstr);

解决方案 »

  1.   

    我发现在不用ODBC也可以的哦...
      

  2.   

    1、Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=timecard;Data Source=bosweb;Extended Properties=""2、Provider=MSDAORA;Password=timecard;User ID=timecard;Data Source=bosweb3、dsn=bosweb;uid=zdwy;pwd=zdwy还有一个:
    Using C#:using System.Data.OracleClient;
     
    OracleConnection oOracleConn = new OracleConnection();
    oOracleConn.ConnectionString = "Data Source=Oracle8i;" +
                                   "Integrated Security=SSPI";
    oOracleConn.Open();
      

  3.   

    using System.Data.OracleClient;
    我的DATA后面没有RracleClient??
      

  4.   

    我在用.NET的OLEDB的时候,
    在建立OLEDBDATAADAPTER的时候,
    winzard的最后一步是一些DETAILS:
    有两个Generated上面是"!",不知道为什么,
    一个是:Generated UPDATE statement:
    Could not determine which columns uniquely identify the rows for "KFC_CHINASTORELIST".
    另一个是:Generated DELETE statement:
    Could not determine which columns uniquely identify the rows for "KFC_CHINASTORELIST".不知道为什么....
    所以在程序中:oleDbDataAdapterOracle.Fill(ds,"KFC_CHINASTORELIST");
    这句总会报错,不能通过,不知道怎么办了:(
      

  5.   

    到以下网址下载,装了它,.net就可以引用该动态连接符http://www.microsoft.com/downloads/details.aspx?FamilyId=4F55D429-17DC-45EA-BFB3-076D1C052524&displaylang=en
      

  6.   

    我已经装了,可是我不知道connectString怎么写啊....
    有没有拖拖控件就可以的办法?
      

  7.   

    要把它写入命名空间,才可引用,细节情况参考asp.net技术内幕。
    Using C#:using System.Data.OracleClient;
     
    OracleConnection oOracleConn = new OracleConnection();
    oOracleConn.ConnectionString = "Data Source=Oracle8i;" +
                                   "Integrated Security=SSPI";
    oOracleConn.Open();
     
    Using VB.NET:Imports System.Data.OracleClient
     
    Dim oOracleConn As OracleConnection = New OracleConnection()
    oOracleConn.ConnectionString = "Data Source=Oracle8i;" & _
                                   "Integrated Security=SSPI";
    oOracleConn.Open()
      

  8.   

    你的方法我试过的,也不行......其实我根本就不懂这个STRING的原理,但时间来不及了,
    谁能快速讲一下原理或有源代码看看都行....
      

  9.   

    楼上的楼上的,如果我的ORACLE是9i的话,你的connectionstring应该怎么写?
      

  10.   

    9i不知是否要下载一个驱动,看以下能否帮到你。
    http://download.oracle.com/otn/other/ole-oo4o/OraOLEDB_92020.exe
    http://download.oracle.com/otn/other/ole-oo4o/OraWin_92010.exe
    http://download.oracle.com/otn/other/ole-oo4o/OraOLEDB_90101.exe
    http://download.oracle.com/otn/other/ole-oo4o/OraOLEDB_81730.zip
    下载后再安装
      

  11.   

    .net里面C#开发:
    using System.Data.OleDb;
    using System.Data;
    看看.net开发有关OleDb的介绍,很简单。
      

  12.   

    用ADO啊﹐和6.0差不多。我用.net和Oracle9i試過沒有問題。