我使用oledb從.txt文件獲取數據,並且遇到錯誤。OleDB'未指定的錯誤'VB
Dim oleDB = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\CompName\C$\Path;ExtendedProperties="Text;HDR=Yes;FMT=Fixed""
其中COMPNAME和路徑是實數值
我得到了適配器未指定的錯誤填寫
Using connection As New OleDbConnection(oleDb)
Using command As New OleDbCommand(sql, connection)
Using adapter As New OleDbDataAdapter(command)
adapter.Fill(s)
End Using
End Using
End Using
Return s
End Function
沒有人嘗試過使用OLEDB從不同的計算機越過歌廳內網的數據?
您設置爲固定格式,你有SCHEMA.INI描述文本文件的結構(也叫做架構)? http://www.connectionstrings.com/microsoft-jet-ole-db-4-0/fixed-length-columns/ – Steve 2014-09-24 09:26:52
是的,我有 - 但我會檢查默認分隔符,以確保 – 2014-09-24 10:00:13
也檢查'正常「的共享名而沒有隱藏的共享C $,這可能是一個權限問題。 – Steve 2014-09-24 10:02:27