hello all..
Hi, I'm having problem to read *.DBF (DBase File) using VB.NET.
Below is my code :
Public abc As String = "C:\Documents and Settings\LASIM\My Documents\20100126a\JADUAL\TCMSV2"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim sql As String
Dim connection As String
Dim dsXML As New DataSet
Try
sql = "Select * from badge.BDF"
connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " + abc + ";Extended Properties=dBASE IV;User ID=Admin;Password="
Dim sqlConn As New OleDbConnection(connection)
Dim ds As New DataSet
sqlConn.Open()
If sqlConn.State = ConnectionState.Closed Then
MsgBox("kitty")
End If
Dim adp As New OleDbDataAdapter(sql, sqlConn)
adp.Fill(ds) <--error here
dsXML.WriteXml("c:\testing.xml")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
end sub
plz help me.. tq