Function to create Database using ADO(ActiveX Data Objects). Good news for ADO Programmers. You onl
Function to create Database using ADO(ActiveX Data Objects). Good news for ADO Programmers. You only need to supply the path where to create
API Declarations
'You must add Microsoft ADO Ext. 2.7 for DDL and Security Reference
'I actually researched this since my thesis requires ADO Functions only
'You only need to supply the path like <app.path> then the DatabaseName <James.mdb>
'Feel free to use my code with ease.
Rate Function to create Database using ADO(ActiveX Data Objects). Good news for ADO Programmers. You onl
(1(1 Vote))
On Error GoTo ErrorHandler:
Dim Cat As New ADOX.Catalog, StrConn$, StrPath$
StrPath = NewDBPath & "\" & NewDBName & ".mdb"
StrConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & StrPath & ";"
Set Cat = New ADOX.Catalog
Cat.Create StrConn
Exit Sub
ErrorHandler:
MsgBox "Error: " & Err.Description, vbCritical + vbOKOnly, "Error " & Err.Number & " in CreateDB!"
End Sub
Function to create Database using ADO(ActiveX Data Objects). Good news for ADO Programmers. You onl Comments
No comments yet — be the first to post one!
Post a Comment