首先我用netmanager创建了一个sos的服务命名(连接的是远程数据库test,创建完之后,测试结果为:连接成功。)
然后在本机ORCALE创建一个dblink。创建字语句为:
create public database link
to_test connect to system identified by system using 'test';
最后在VS2010的连接字符串为:
 private static readonly string conStr = "data source=to_test;user id=system;password=system";在运行的时候提示的是无法解析字符串~~!请大家帮忙找下错·····

解决方案 »

  1.   

    连接字符串搞错了 data source应该是sos才对
    private static readonly string conStr = "data source=sos;user id=system;password=system";
      

  2.   

    1  配置net manager    名字为test     建立完成并且测试后   保存~~!
    2  创建DBLINK   进入ORCL :
    create public database link
    to_test connect to  system identified by system using 'orcl'
    to_test 为DBLINK的名字(随意)system/system是用户名字和密码
    orcl 是远程连接的数据库实例    输入完注意commit
    3.VS里面连接数据库字符串: private static readonly string conStr = "data source=test;user id=system;password=system";
    data source=test(test是netmanager创建的服务命名)
    4.查询语句里面 eg:select * from db_oo@to_test;(to_test 是创建DBLINK名)感谢各位大大指点    拜谢~