我正在尝试使用 .NET 3.5 中的 OracleConnection 建立与远程 oracle 数据库的连接(我知道它已在更高版本的 .NET 中被弃用)。为什么 Visual Studio 不能识别语句 myAdapter.fill(mydataset)
Imports System.Data.OracleClient //I compiled the project to .net 3.5. there is a warning for system.threading.tasks but not for system.data.oracleclient
Public Class Form1
Dim cString As String = "Data Source=usr/pw@host:1521/orcl"
Dim myCon As OracleConnection = New OracleConnection(cString)
Dim myAdapter As OracleDataAdapter = New OracleDataAdapter("select * from courses", cString)
Dim myDataSet As DataSet = New DataSet
myAdapter.fill(myDataset) //Declaration expected
//this strange behavior might be a clue ... Dim m as OracleDataReader = new OracleDataReader yields overload resolution failed because no new is accessible