Create Method Example (VB)
The following code shows how to create a new Microsoft Jet database with the Create method.
Attribute VB_Name = "Create"
Option Explicit
' BeginCreateDatabaseVB
Sub CreateDatabase()
On Error GoTo CreateDatabaseError
Dim cat As New ADOX.Catalog
cat.Create "Provider='Microsoft.Jet.OLEDB.4.0';Data Source='new.mdb'"
'Clean up
Set cat = Nothing
Exit Sub
CreateDatabaseError:
Set cat = Nothing
If Err <> 0 Then
MsgBox Err.Source & "-->" & Err.Description, , "Error"
End If
End Sub
' EndCreateDatabaseVB
See Also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for