DBF数据库与VB.NET连接 [英] DBF database connect with VB.NET

查看:77
本文介绍了DBF数据库与VB.NET连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何连接到。使用VB 2008的DBF数据库和在dadagrid中的节目?谢谢。

how to connect to. DBF database with VB 2008 and that the show in dadagrid? thanks.

推荐答案

您好



检查连接字符串 dbf的连接字符串 [ ^ ]

可能会有所帮助。



如果您已经尝试过,请使用改善问题选项输入错误或异常。
Hi

Check connection strings connection strings for dbf[^]
Might be helpful.

If you already tried, Put your error or exception by using 'Improve question' option.


我发现了这个:



I found this:

Dim ConnectionString As String

       ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\;Extended Properties=dBase IV"
       Dim dBaseConnection As New System.Data.OleDb.OleDbConnection(ConnectionString)
       dBaseConnection.Open()

       Dim dBaseCommand As New System.Data.OleDb.OleDbCommand("SELECT * FROM dbase", dBaseConnection)
       Dim dBaseDataReader As System.Data.OleDb.OleDbDataReader = dBaseCommand.ExecuteReader(CommandBehavior.SequentialAccess)

       While dBaseDataReader.Read
           TextBox1.Text = (dBaseDataReader("Column1").ToString)
           TextBox2.Text = (dBaseDataReader("Column2").ToString)
           TextBox3.Text = (dBaseDataReader("Column3").ToString)
       End While

       dBaseConnection.Close()





但是我们只显示最后一行...如果有人知道怎么做才能回到第一行或下一行,最后一行...



but we show only the last line ... if anyone knows how I could do to get back to the first or next row, the last ...


如果有人知道我是怎么做的?
if anyone knows how i do this??


这篇关于DBF数据库与VB.NET连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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