CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 1999
    Location
    Netherlands
    Posts
    181

    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 :-)

  2. #2
    Join Date
    May 1999
    Posts
    3,332

    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).


  3. #3
    Join Date
    May 1999
    Posts
    3,332

    Re: Blackout... create database using ADO

    BTW my previos post was from MS office 2000/ vb programmers guide...


  4. #4
    Join Date
    Apr 1999
    Location
    Netherlands
    Posts
    181

    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 :-)

  5. #5
    Join Date
    May 1999
    Posts
    3,332

    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)


  6. #6
    Join Date
    May 1999
    Posts
    3,332

    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!


  7. #7
    Join Date
    Apr 1999
    Location
    Netherlands
    Posts
    181

    Re: Blackout... create database using ADO

    Hey that's neat, it solves a lot of problems :-)
    Tnx man :-))

    Crazy D @ Work :-)

  8. #8
    Join Date
    May 1999
    Posts
    3,332

    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.


  9. #9
    Join Date
    Apr 1999
    Location
    Netherlands
    Posts
    181

    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 :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured