Information générale
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement