C#连接oracle
我想C#连接oracle数据库,在web.config中connectionStrings该怎么配?就类似于SQL的connectionString="DataSourc...
我想C#连接oracle数据库,在web.config中connectionStrings该怎么配?就类似于SQL的connectionString="Data Source=192.168.1.111;Initial Catalog=xxx9;User ID=sa;Password=123"这种!
展开
1个回答
展开全部
方法1:
System.Data.OracleClient
oracleConnectionString : data source = orcl;user id= scott; password=tiger;persist security info=false;
方法2:
oracleConnectionString :
Provider=OraOLEDB.Oracle.1;User ID=scott;Password=tiger;Data Source=(DESCRIPTION = (ADDRESS_LIST= (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.125.250)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl)))
方法3:
oracleConnectionString:
User ID=scott;Password=tiger;Data Source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST=10.10.125.250)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))
System.Data.OracleClient
oracleConnectionString : data source = orcl;user id= scott; password=tiger;persist security info=false;
方法2:
oracleConnectionString :
Provider=OraOLEDB.Oracle.1;User ID=scott;Password=tiger;Data Source=(DESCRIPTION = (ADDRESS_LIST= (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.125.250)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl)))
方法3:
oracleConnectionString:
User ID=scott;Password=tiger;Data Source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST=10.10.125.250)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询