从vb.net写入dbf

编程入门 行业动态 更新时间:2024-10-23 05:01:29
本文介绍了从vb写入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

本文发布于:2023-11-06 14:28:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1563938.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:vb   net   dbf

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!