急!!救命:读取dbf出错~~!!???

执行:Dim strcon As String = ConfigurationManager.ConnectionStrings("SHConsignmentConnectionString").ConnectionString
        Dim con As SqlConnection = New SqlConnection(strcon)
        con.Open()
        Dim cmd As SqlCommand = New SqlCommand()
        cmd.Connection = con
        cmd.CommandText = "insert into SALESTABLE (INVOICEACCOUNT) select (din_no) from openrowset('MSDASQL','Driver=Microsoft Visual FoxPro Driver;SourceType=DBF;SourceDB=D:\hkpos\hkpos','select * from INV.DBF')"
        cmd.ExecuteNonQuery()
        con.Close()
        con.Dispose()

出错提示:Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)".
OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Driver Manager] Driver does not support this function".

请问怎会这样,解决办法!??!~?路过的高人,请教~


叮当猫咪
浏览 844回答 2
2回答

胡子哥哥

文件名称写完整。加上后缀试试
打开App,查看更多内容
随时随地看视频慕课网APP