S
Sajid
Hi! Bill,
Actually I am using the following code to pack my FoxPro tables (Not
Visual FoxPro tables). You know when you delete records from FoxPro
they are just marked for deletion and don't get permanently deleted
unless you issue pack command in FoxPro. So I am using the following
snippet to achieve that. Now the problem is that everything works and
the records actually get deleted but my program hangs on the
cmd.ExecuteNonQuery() command. So can you tell me what am I doing
wrong.
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()
cheers
SY
Actually I am using the following code to pack my FoxPro tables (Not
Visual FoxPro tables). You know when you delete records from FoxPro
they are just marked for deletion and don't get permanently deleted
unless you issue pack command in FoxPro. So I am using the following
snippet to achieve that. Now the problem is that everything works and
the records actually get deleted but my program hangs on the
cmd.ExecuteNonQuery() command. So can you tell me what am I doing
wrong.
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()
cheers
SY