Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to create a database with ado

0 views
Skip to first unread message

Bill

unread,
Jan 5, 2003, 7:40:53 PM1/5/03
to
With dao, I can create a database using function
createdatabase. Can someone tell me how to implement this
with ado?

Thanks in advance

Bill

Matthias Hirsch-Hoffmann

unread,
Jan 6, 2003, 6:36:27 AM1/6/03
to
Hi Bill

Add the Microsoft ActiveX Data Objects Extensions for Data Definition
Language and Security (short ADOX) Object to your Project.

The following code then creates a new jet-database:
Sub CreateDatabase()

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

End Sub
Matthias


"Bill" <entrep...@sohu.com> schrieb im Newsbeitrag
news:05a201c2b51c$44adfc80$89f82ecf@TK2MSFTNGXA01...

Ramesh

unread,
Jan 6, 2003, 11:16:08 AM1/6/03
to
Checkout the article.

Q252908 HOWTO: Create a Table with Primary Key Through ADOX
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q252908

Hope this helps.

Ramesh Thyagarajan, MCSD,MCDBA
Microsoft Developer support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.

0 new messages