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 26 27 28 29 30 31 32
|
Private Sub CreateDatabase()
Dim dbConnectStr As String
Dim Catalog As Object
Dim cnt As ADODB.Connection
Dim dbPath As String
'Set database name here
dbPath = "chemin_base_données.mdb"
dbConnectStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath & ";"
'Create new database
Set Catalog = CreateObject("ADOX.Catalog")
'Catalog.Create dbConnectStr
'Set Catalog = Nothing
'Connect to database and insert a new table
Set cnt = New ADODB.Connection
With cnt
.Open dbConnectStr
.Execute "CREATE TABLE matable ([Period start time] date," & _
"[MSC name] text(20) WITH Compression," & _
"[Setup success ratio] decimal(24,13)," & _
"[Long setup time is a PRFILE parameter which describes the time limit for the long call setups.] decimal(24,13)," & _
"[The longest call setup time for internal failure released connections] decimal(24,13)," & _
"[The shortest successful setup time] decimal(24,13)," & _
"[The longest successful setup time] decimal(24,13)," & _
"[Account] decimal(8,3))"
End With
Set cnt = Nothing
End Sub |
Partager