| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1444 人关注过本帖
标题:Oracle和C#
取消只看楼主 加入收藏
cfchhh
Rank: 1
等 级:新手上路
帖 子:85
专家分:0
注 册:2005-5-8
收藏
 问题点数:0 回复次数:1 
Oracle和C#
求C#连接Oracle的数据库连接程序或连接语句(Oracle数据库在服务器上)本人之熟悉C#和SQL得数据库连接 ,希望哪位仁兄支持一下,先谢过拉!
搜索更多相关主题的帖子: Oracle 数据库 SQL 服务器 谢过拉 
2005-10-10 16:44
cfchhh
Rank: 1
等 级:新手上路
帖 子:85
专家分:0
注 册:2005-5-8
收藏
得分:0 
问题解决了,以下是Oracle的常见的数据库连接
Oracle
  • ODBC

    • New version:
      "Driver={Microsoft ODBC for Oracle};Server=OracleServer.world;Uid=Username;Pwd=asdasd;"


    • Old version:
      "Driver={Microsoft ODBC Driver for Oracle};ConnectString=OracleServer.world;Uid=myUsername;Pwd=myPassword;"


  • OLE DB, OleDbConnection (.NET)

    • Standard security:
      "Provider=msdaora;Data Source=MyOracleDB;User Id=UserName;Password=asdasd;"
      This one's from Microsoft, the following are from Oracle
    • Standard Security:
      "Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=Username;Password=asdasd;"


    • Trusted Connection:
      "Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;OSAuthent=1;"


  • OracleConnection (.NET)

    • Standard:
      "Data Source=MyOracleDB;Integrated Security=yes;"
      This one works only with Oracle 8i release 3 or later
    • Specifying username and password:
      "Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated Security=no;"
      This one works only with Oracle 8i release 3 or later
    • Declare the OracleConnection:
      C#:
      using System.Data.OracleClient;
      OracleConnection oOracleConn = new OracleConnection();
      oOracleConn.ConnectionString = "my connectionstring";
      oOracleConn.Open();


      VB.NET:
      Imports System.Data.OracleClient
      Dim oOracleConn As OracleConnection = New OracleConnection()
      oOracleConn.ConnectionString = "my connectionstring"
      oOracleConn.Open()


      Missing the System.Data.OracleClient namespace? Download .NET Managed Provider for Oracle >>
      Great article! "Features of Oracle Data Provider for .NET" by Rama Mohan G. at C# Corner
  • Core Labs OraDirect (.NET)

    • Standard:
      "User ID=scott; Password=tiger; Host=ora; Pooling=true; Min Pool Size=0;Max Pool Size=100; Connection Lifetime=0"
      Read more at Core Lab and the product page.
  • Data Shape

    • MS Data Shape:
      "Provider=MSDataShape.1;Persist Security Info=False;Data Provider=MSDAORA;Data Source=orac;user id=username;password=mypw"
      Want to learn data shaping? Check out 4GuyfFromRolla's great article about Data Shaping >>

2005-11-01 11:58
快速回复:Oracle和C#
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.023528 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved