Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Foxpro table creation in VB
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00291969
Message ID:
00292434
Vues:
20
Good One! The following code does work:
Dim cn As New ADODB.Connection
Dim cm As New ADODB.Command
cn.Open "Driver=Microsoft Visual Foxpro Driver;UID=;SourceType=DBF;Deleted=YES;Null=NO;SourceDB=E:\"
cm.ActiveConnection = cn
cm.CommandType = adCmdUnknown
cm.CommandText = "CREATE TABLE C:\TEST (TEST C(10))"
cm.Execute

The only watchout is that the command ignores the SourceDB setting and creates it in an upredicatable directory unless you specify the path like shown as C:\TEST. If you just specify CREATE TABLE TEST it will create the dbf in VB's current directory setting, not the SourceDB setting.


>Joe,
>
>According to the docs for the VFP ODBC driver, you should be able to create tables by submitting a CREATE TABLE command. Look for the file drvvfp.hlp on your computer.
>
>-Mike
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform