Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Packing of dbf file in ADO ?
Message
From
03/03/2004 22:44:10
 
 
To
03/03/2004 22:33:07
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00877587
Message ID:
00882978
Views:
18
Hi,

Thank for your help and sample. Will test on it.

Just like to know the following issue,

Why after closing the dbf file that I open using recordset,
using my own VFP written DLL to pack the dbf fail ?

Didn't the close function close the open dbf file or
must I also close the connection ?

Any ideal on the it.



>>Thank for your example, will test it out.
>>
>>However, I using free table without the .dbc file,
>>can I just open the dbf file and pack it ?
>
>The following worked for me with a free table. However, I had trouble when there were spaces in the path of the Data Source:
Option Explicit
>
>Sub Main()
>
>    Dim cnConn As ADODB.Connection
>    Dim cmdCommand As ADODB.Command
>
>    Set cnConn = New ADODB.Connection
>    cnConn.Open "User ID=;DSN=;" & _
>         "Cache Authentication=False;Data Source=""C:\Temp\"";" & _
>         "Password=;Provider=""VFPOLEDB.1"";Collating Sequence=MACHINE;Mask Password=False;Mode=Share Deny None;" & _
>         "Extended Properties=;Encrypt Password=False;"
>
>    Set cmdCommand = New ADODB.Command
>    cmdCommand.CommandType = adCmdText
>    Set cmdCommand.ActiveConnection = cnConn
>    cmdCommand.CommandText = "SET EXCLUSIVE ON"
>    cmdCommand.Execute
>    cmdCommand.CommandText = "PACK TestDelete"
>    cmdCommand.Execute
>
>End Sub
Best Regards
Virusim
Previous
Reply
Map
View

Click here to load this message in the networking platform