1.odbc里面建立一个system dsn,要用MSDAORA,
也就是微软的odbc连接oracle,不要用oracle自己提供的odbc
2.
Public Sub ConnODBC(ByVal dsnName As String) 
mCnnDB.Provider = "MSDAORA" 
mCnnDB.ConnectionString = "Data Source='" & dsnName & "'" 
mCnnDB.Open() 
End Sub
3。vb.net用连接串我一年前就连了,还没连上,:)
只能用dsn

解决方案 »

  1.   

    楼主:
    Provider=MSDAORA.1;Password=bart;User ID=bart;Data Source=production.world;Persist Security Info=True
    这条联结是用的微软的连接啊. 根本就没用你建的dns. 上面的这个连接可以连上, 我一直用这种方式连接的. 在微软的系统上运行的程序,当然用微软的工具,(我想) , public string connectora="Provider=MSDAORA.1;Password=密码;User ID=用户名;Data Source=连接串;Persist Security Info=True";
      

  2.   

    VS.net用OracleClient命名空间多好啊。全托管代码,速度快很多。