C# 程序中,不使用TNS File 中的服务名进行数据库连接

Oracle Client Not Use Tnaname,

 

string connectionstring = string.Concat("
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=IP地址)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=数据库)));UserId=用户名;Password=密码;
                                                         ");

 


OracleConnection con = new OracleConnection(connectionstring);

posted on 2012-06-05 15:03  Kevin Kim  阅读(259)  评论(0编辑  收藏  举报

导航