vbgen Level: Moderator Registered: 10-10-2002 Posts: 876
Create A Database
'Create an MS-ACCESS Database with VB
'Include the Below References from Project Menu
'Microsoft ActiveX Data Objects 2.1 Library
'Microsoft ActiveX Data Objects RecordSet 2.1 Library
'Declare these Variables
Dim Com as New ADODB.Command
Dim Con as New ADODB.Connection
Private Sub CreateNewDatabase()
'Specify the Connection as below
Con.Provider="Microsoft.Jet.OLEDB.3.51"
'specify the Database here
Con.Open "c:windowsdesktopCreatedDB.mdb"
Com.ActiveConnection=Con
'Code
Com.Commandtext="Create table CreatedTable(TableNo number(4));"
Com.Execute
End Sub
Also hoping for feedback on this if there are any problems...
thanks.
____________________________
Been busy trying to take a second degree <--it's not working out...