Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'FoxPro 2.6
- 'vdos = https://www.vdos.info/download.php
- 'ConnectionString = https://www.connectionstrings.com/dbf-foxpro/
- 'OLEDB - Data Source = Folder Path
- 'ODBC - DBQ = Folder Path
- 'CommandText = Select * From FileName.dbf
- 'ODBC Data Source Administrator shortcut, Win + R (Run dialog) then type odbcad32
- 'Check Drivers Tab
- 'Example: Driver={Microsoft Access dBASE Driver (*.dbf, *.ndx, *.mdx)}
- Imports System.Data.Odbc
- Imports System.Data.OleDb
- Public Class Form1
- Private Sub BtnLoadOLEDB_Click(sender As Object, e As EventArgs) Handles BtnLoadOLEDB.Click
- Using con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;
- Data Source=C:\vDos\FPD26\SAMPLE\CATALOG\;
- Extended Properties=dBASE IV;")
- Using adp As New OleDbDataAdapter("Select * From CUSTOMER.DBF", con)
- Using DT As New DataTable
- adp.Fill(DT)
- DGV.DataSource = DT
- End Using
- End Using
- End Using
- End Sub
- Private Sub BtnLoadODBC_Click(sender As Object, e As EventArgs) Handles BtnLoadODBC.Click
- Using con As New OdbcConnection("Driver={Microsoft Access dBASE Driver (*.dbf, *.ndx, *.mdx)};
- Dbq=C:\vDos\FPD26\SAMPLE\CATALOG\;")
- Using adp As New OdbcDataAdapter("Select * From CUSTOMER.DBF", con)
- Using DT As New DataTable
- adp.Fill(DT)
- DGV.DataSource = DT
- End Using
- End Using
- End Using
- End Sub
- End Class
Add Comment
Please, Sign In to add comment