Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dbase III file connection

Status
Not open for further replies.

nbhatti

Programmer
Joined
Sep 23, 2008
Messages
4
Location
PK
i have some dbase III file. i want to develop data transfer routine. but unable to connect dbase .dbf file. plz help to connect the .dbf file.
 
In days of old I would say use DAO or DAO-ODBC for best results. Followed by RDO and finally ADO if you must. Now how I learned to use these different technolagies was through the old VB5/6 data form wizards and if I remember correctly, VB.Net also had this wizard. Now it has been awhile since I delved into the design environment of .NET so I could be wrong about this wizard but if I'm not my question to you is...have you tried to see if the all powerful and mighty wizard can do something for you?

Good Luck
 
but unable to connect dbase .dbf file. plz help to connect the .dbf file

What have you tried? Try Connectionstrings.com as an early stop in figuring out how to connect to a new data source.

Reading the top paragraph here:

it seems to say that the Visual Fox Pro drivers will do what you want, which is under this section:
 
i achive by the following code
ano dsn is required
'

Imports System.Data.Odbc
Public Class Form5

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cnN As New Odbc.OdbcConnection
Dim cmdN As New Odbc.OdbcCommand
Dim daN As New Odbc.OdbcDataAdapter
Dim dsN As New DataSet
Dim myConnection As New Odbc.OdbcConnection

myConnection.ConnectionString = "dsn=ano"
myConnection.Open()
cmdN.CommandText = "select * from ano "
cmdN.Connection = myConnection
daN.SelectCommand = cmdN
daN.Fill(ds, "abc")
MsgBox(ds.Tables("abc").Rows(0).Item("name"))

End Sub
End Class
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top