How do I connect (use) a fox 2.6 table from vb.net
I need to update a fox 2.6 table from vb.net. Can anyone help me?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
eAnswers Team
Here is the coding for you you may apply it to connect a Fox 2.6 table from a Vb. Net :-
Private Sub btnListTables_Click(ByVal sender As _
System.Object, ByVal e As System.EventArgs) Handles _
btnListQueries.Click
lvwTables.Items.Clear()
‘ Open the connection.
Dim conn As New ADODB.Connection
conn.ConnectionString = _
“Provider=Microsoft.Jet.OLEDB.4.0;” & _
“Persist Security Info=False;” & _
“Data Source=” & txtDatabase.Text
conn.Open()
‘ Make a catalog for the database.
Dim cat As New ADOX.Catalog
cat.ActiveConnection = conn
‘ List the catalog’s tables.
For i As Integer = 0 To cat.Tables.Count – 1
Dim lvi As ListViewItem = _
lvwTables.Items.Add(cat.Tables(i).Name)
lvi.SubItems.Add(cat.Tables(i).Type)
Next i
conn.Close()
lvwTables.Columns(0).Width = -2
lvwTables.Columns(1).Width = -2
End Sub
eAnswers Team
Here is the coding for you you may apply it to connect a Fox 2.6 table from a Vb. Net :-
Private Sub btnListTables_Click(ByVal sender As _
System.Object, ByVal e As System.EventArgs) Handles _
btnListQueries.Click
lvwTables.Items.Clear()
‘ Open the connection.
Dim conn As New ADODB.Connection
conn.ConnectionString = _
“Provider=Microsoft.Jet.OLEDB.4.0;” & _
“Persist Security Info=False;” & _
“Data Source=” & txtDatabase.Text
conn.Open()
‘ Make a catalog for the database.
Dim cat As New ADOX.Catalog
cat.ActiveConnection = conn
‘ List the catalog’s tables.
For i As Integer = 0 To cat.Tables.Count – 1
Dim lvi As ListViewItem = _
lvwTables.Items.Add(cat.Tables(i).Name)
lvi.SubItems.Add(cat.Tables(i).Type)
Next i
conn.Close()
lvwTables.Columns(0).Width = -2
lvwTables.Columns(1).Width = -2
End Sub
eAnswers Team
Here is the coding for you you may apply it to connect a Fox 2.6 table from a Vb. Net :-
Private Sub btnListTables_Click(ByVal sender As _
System.Object, ByVal e As System.EventArgs) Handles _
btnListQueries.Click
lvwTables.Items.Clear()
‘ Open the connection.
Dim conn As New ADODB.Connection
conn.ConnectionString = _
“Provider=Microsoft.Jet.OLEDB.4.0;” & _
“Persist Security Info=False;” & _
“Data Source=” & txtDatabase.Text
conn.Open()
‘ Make a catalog for the database.
Dim cat As New ADOX.Catalog
cat.ActiveConnection = conn
‘ List the catalog’s tables.
For i As Integer = 0 To cat.Tables.Count – 1
Dim lvi As ListViewItem = _
lvwTables.Items.Add(cat.Tables(i).Name)
lvi.SubItems.Add(cat.Tables(i).Type)
Next i
conn.Close()
lvwTables.Columns(0).Width = -2
lvwTables.Columns(1).Width = -2
End Sub