Blackout... create database using ADO
Hi
I'm having a blackout.. how do I create a database using ADO?
DAO is no problem but since I'm using ADO I'd like to use that... but I can't remember/can't find how to start...
Any idea where to start?
Tnx alot
Hope my brain is clear tomorrow.. probably not *LOL*
Crazy D @ Work :-)
Re: Blackout... create database using ADO
you can't!
you need "Microsoft ADO Extensions for DDL and Security 2.1 (ADOX), " aka ADOX
(from MSDN).
Re: Blackout... create database using ADO
BTW my previos post was from MS office 2000/ vb programmers guide...
Re: Blackout... create database using ADO
Good it wasn't me :-)
But I understand it's an extension from Access 2000.. so that means I can only create an Access2000 database with it? (not readable with Access95/97?)
Crazy D @ Work :-)
Re: Blackout... create database using ADO
may I suggest that you try it?
just add a reference to "Microsoft ADO Ext 2.1 for DDL and Security" and (probably) use the Catalog.Create method...
let us know if it (doesn't) work(s)
Re: Blackout... create database using ADO
hey, I tested it and surprise! it worked:
Private Sub Command1_Click()
Dim c As ADOX.Catalog
Set c = New ADOX.Catalog
c.Create "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=m:\schrott\test2.mdb"
End Sub
I could open the MDB in Access 95!
Re: Blackout... create database using ADO
Hey that's neat, it solves a lot of problems :-)
Tnx man :-))
Crazy D @ Work :-)
Re: Blackout... create database using ADO
>...solves a lot of problems.
...and probably creates a bunch of new problems?
e.g. when you use invalid parameters you get an error "there are several errors" (don't know how to translate my German error message into meaningful English). I haven't found a way to find out, WHAT errors occurred.
Re: Blackout... create database using ADO
hehe yeah probably, after all it's M$.. but I know those errors.. absolutely not-usefull :-) I've made enough workarounds for those errors though..
Crazy D @ Work :-)