
Packing a FoxPro table via ODBC.net from VB.net
Hi,
You can pack a VFP table with the code similar to the following:
Dim cn As OdbcConnection
cn = New OdbcConnection("Driver={Microsoft Visual FoxPro
Driver};SourceType=DBF;SourceDB=c:\dbfpath;")
Dim mystring As String = "SET EXCLUSIVE ON;PACK Table1"
Dim cmd As OdbcCommand = New OdbcCommand(mystring, cn)
cn.Open()
cmd.ExecuteNonQuery()
cn.Close()
Here is a related article that you can check for more information:
HOWTO: Pack a Table Through the Visual FoxPro ODBC Driver (VFPODBC.dll)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q234756
Regards,
Elan Zhou
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com