Use application start something as this (I never did this with dbase)
\\\
Dim p As New System.Diagnostics.ProcessStartInfo()
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = "C:\filename.dbf"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)
///
As a database have a look first here (Foxpro) http://www.connectionstrings.com/
¤ I want to open a dbf file in vb.net,how can I do it?
¤
¤ Regards
¤ Chuen
¤
See if the following helps:
Dim ConnectionString As String
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=e:\My Documents\dBase;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 MyDBase",
dBaseConnection)
Dim dBaseDataReader As System.Data.OleDb.OleDbDataReader =
dBaseCommand.ExecuteReader(CommandBehavior.SequentialAccess)
While dBaseDataReader.Read
Console.WriteLine(dBaseDataReader("Column1").ToString)
Console.WriteLine(dBaseDataReader("Column2").ToString)
Console.WriteLine(dBaseDataReader("Column3").ToString)
End While
dBaseConnection.Close()
Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
I have had very good success with ODBC. Set up the database directory under
System DSN. All your connection string has to say is "DSN=XXX"
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.