由于安装了累积的 Windows 10 1909 更新,因此在访问 MS Access accdb 时出现以下异常。:外部组件引发了异常。重新安装 Microsoft ACE DatabaseEngine 2010 (OLEDB.12.0 ..) 后,一切正常。我能做些什么呢?
Dim sel As String = "Select Notiz from T_TerminNotiz where ztrText=@ztrText and serNr=@serNr"
Using myConnection As New OleDbConnection(myConnStringX1)
myConnection.Open()
Using mySqlCmd As New OleDbCommand(sel, myConnection)
mySqlCmd.CommandType = CommandType.Text
mySqlCmd.CommandTimeout = myCmdTimeOut
mySqlCmd.CommandText = sel
mySqlCmd.Parameters.Clear()
mySqlCmd.Parameters.Add(New OleDbParameter("@ztrText", OleDbType.VarChar)).Value = strKlient
mySqlCmd.Parameters.Add(New OleDbParameter("@serNr", OleDbType.Integer)).Value = serNr
oRet = mySqlCmd.ExecuteScalar()
End Using
End Using