首页 新闻 会员 周边 捐助

求救:ERROR [HY000] [Microsoft][ODBC dBase 驱动程序] 外部表不是预期的格式?!!?!

0
悬赏园豆:20 [已关闭问题]

本人的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 驱动程序] 外部表不是预期的格式

请问怎么会这样,及解决办法!!??

long-2008的主页 long-2008 | 初学一级 | 园豆:122
提问于:2010-08-05 17:40
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册