1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Dim LaDB As String = application.StartupPath + "\MaBase.mdb"
Dim ADOXcatalog As New ADOX.Catalog
Dim ADOXtable As New ADOX.Table
Dim ADOXindex As New ADOX.Index
ADOXcatalog.Create("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & LaDB)
ADOXcatalog.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & LaDB
ADOXtable.Name = "Membres"
ADOXtable.Columns.Append("Licence", ADOX.DataTypeEnum.adVarWChar, 7)
ADOXtable.Columns.Append("Nom", ADOX.DataTypeEnum.adVarWChar, 30)
ADOXtable.Columns.Append("Prenom", ADOX.DataTypeEnum.adVarWChar, 30)
ADOXtable.Columns.Append("Id", ADOX.DataTypeEnum.adInteger) 'Je voudrai l'autoIcrement ici ;)
ADOXcatalog.Tables.Append(ADOXtable)
ADOXindex.Columns.Append("Licence")
ADOXtable.Indexes.Append(ADOXindex)
ADOXtable = Nothing
ADOXindex = Nothing
ADOXcatalog = Nothing |
Partager