如果用 OracleConnection的话与SqlConnection的使用基本一样。 或者你也可以用OleDbConnection去做连接 Dim MyCon As OleDbConnection Dim MyDta As OleDbDataAdapter Dim ConStr As String ConStr = "Provider=MSDAORA.1;Password=YourPassword;Persist Security Info=true;User id=YourUserName;Data Source=数据源;Extended Properties=" MyCon = New OleDbConnection(ConStr) MyCon.Open()'打开连接 .........对数据库操作
或者你也可以用OleDbConnection去做连接
Dim MyCon As OleDbConnection
Dim MyDta As OleDbDataAdapter
Dim ConStr As String
ConStr = "Provider=MSDAORA.1;Password=YourPassword;Persist Security Info=true;User id=YourUserName;Data Source=数据源;Extended Properties="
MyCon = New OleDbConnection(ConStr)
MyCon.Open()'打开连接
.........对数据库操作