本人的dbf文件放在 D:\hkpos\hkpos文件夹内,执行以下程序
Dim mydataconn As Odbc.OdbcConnection = New Odbc.OdbcConnection()
Dim connstring As String
connstring = "Driver={Microsoft dBase Driver (*.dbf)};DBQ=D:\hkpos\hkpos"
mydataconn.ConnectionString = connstring
Dim mydatacmd As Odbc.OdbcCommand = New Odbc.OdbcCommand()
mydataconn.Open()
mydatacmd.Connection = mydataconn
mydatacmd.CommandText = "select * from INV"
Dim mydataAdp As Odbc.OdbcDataAdapter = New OdbcDataAdapter()
Dim mydataset As DataSet = New DataSet()
mydataAdp.SelectCommand = mydatacmd
mydataAdp.Fill(mydataset)
GridView1.DataSource = mydataset
GridView1.DataBind()
出错:ERROR [HY000] [Microsoft][ODBC dBase 驱动程序] 外部表不是预期的格式
请问怎么会这样,及解决办法!!??