CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: ADO question

  1. #1
    Join Date
    Jul 2000
    Location
    Slovenia
    Posts
    77

    ADO question

    Hi all

    Does anybody know how to create a new database using ADO. I wanna create a whole new file (Data.mdb for example). I know how to create it using DAO by calling CreateDatabase function, but I don't know how to do this under ADO. I have one more question. I have two recordsets. First is a table and the second is a query (view). When I change a record in first recordset (table), the change isn't reflected to a second recordset (query) which is connected to a DataGrid control.

    Thanks in advance!!


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: ADO question

    Make sure you have a reference set to the ADOX object library then use the following code.

    Dim objCatalog as ADOX.Catalog

    Set objCatalog = New ADOX.Catalog
    objCatalog.Create "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=c:\mynewdb.mdb"




    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

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