Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLEDB/ADO Database Table Creation ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00559939
Message ID:
00559961
Vues:
25
Hi!
You need to use ADOX instead of ADODB.
The followind sample demostrates how to create table in VB:
' BeginCreateTableVB
Sub CreateTable()

   Dim tbl As New Table
   Dim cat As New ADOX.Catalog

'Open the catalog.
   ' Open the Catalog.
   cat.ActiveConnection = _
      "Provider=Microsoft.Jet.OLEDB.4.0;" & _
      "Data Source=c:\Program Files\Microsoft Office\" & _
      "Office\Samples\Northwind.mdb;"

   tbl.Name = "MyTable"
   tbl.Columns.Append "Column1", adInteger
   tbl.Columns.Append "Column2", adInteger
   tbl.Columns.Append "Column3", adVarWChar, 50
   cat.Tables.Append tbl

End Sub
' EndCreateTableVB
>I am trying to hack through the MSKB JET OLEDB samples to figure out how to create a database and tables and indexes through VBScript. So far I am not getting very far. Has anyone already tried to do this?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform