Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a NEW ADO database using Jet

Status
Not open for further replies.

DGA15

Programmer
Aug 19, 2000
40
0
0
US
How can I create a new ADO-Jet database? Once created I know how to add the tables, fields, etc. but I cannot seem to create a new, empty database from VB6 code.
 
Add a reference to the Microsoft ADO Ext 2.6 for Dll and Security and then use the following code:

Sub CreateDatabase()

Dim cat As New ADOX.Catalog
cat.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\new.mdb"

End Sub

Hope this helps Anything is possible, the problem is I only have one lifetime.
[cheers]
 
I know I once had a really good reply on this but I can't find it...

anyway here are 2 other links that might be helpful.
thread222-80959 thread222-60995 Craig, mailto:sander@cogeco.ca

Remember not to name the Lambs...
It only makes the chops harder to swallow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top