从vb.net写入dbf [英] Write to a dbf from vb.net

查看:126
本文介绍了从vb.net写入dbf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将数据表中的内容写入.dbf
我该怎么办?..

I need to write the content in a datatable to a .dbf
How can i do it?..

我正在将插入查询作为参数传递给此方法.

I am passing the insert query as a parameter to this method.

错误:Microsoft Jet数据库引擎找不到对象'tbl_trip'.确保对象存在,并正确拼写其名称和路径名.

Error:The Microsoft Jet database engine could not find the object 'tbl_trip'.  Make sure the object exists and that you spell its name and the path name correctly.


 公共子createDBF(ByVal查询为字符串)
       Dim strquery As String = Nothing
                             Dim sConnectionStringOLEDB As String ="Provider = Microsoft.Jet.OLEDB.4.0;数据源= D:\ My Folder \ Test_TransMgr_08302010PM \ MyMDCApp \ MyMDCApp \;扩展属性= dBASE IV;用户ID = Admin;密码=;"


 Public Sub createDBF(ByVal query As String)
        Dim strquery As String = Nothing
                Dim sConnectionStringOLEDB As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\My Folder\Test_TransMgr_08302010PM\MyMDCApp\MyMDCApp\;Extended Properties=dBASE IV;User ID=Admin;Password=;"

      昏暗的mycon作为新的OleDbConnection(sConnectionStringOLEDB)
       mycon.Open()
      将mycommand调暗为新的OleDbCommand(query,mycon)
       mycommand.ExecuteNonQuery()

        Dim mycon As New OleDbConnection(sConnectionStringOLEDB)
        mycon.Open()
        Dim mycommand As New OleDbCommand(query, mycon)
        mycommand.ExecuteNonQuery()

     
 结束子

      
 End Sub

 

谢谢

推荐答案

尝试

Try the Access forum.

这个问题似乎与Windows窗体无关.

This question does not look like have anything to do with Windows Forms.


这篇关于从vb.net写入dbf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆