Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Packing of dbf file in ADO ?
Message
De
03/03/2004 22:44:10
 
 
À
03/03/2004 22:33:07
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00877587
Message ID:
00882978
Vues:
19
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform