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

Thread: how to....

  1. #1
    Join Date
    Aug 1999
    Location
    US, Florida
    Posts
    817

    how to....

    How to create .mdb file and create recorset for 10 textboxes where I can save to, read from and edit

    Programs and requests for them for FREE.
    http://falstok.fly.to

  2. #2
    Join Date
    Dec 1999
    Posts
    20

    Re: how to....

    you need MS Access to create mdb files. Using MS Access you can create tables, store data, write query, reports, macrow's and much more.
    MS Access is part of MS Office package. It can be purchased separetly, i beleive.



  3. #3
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: how to....

    You *don't* need access to create MDB databases - you can either do it through code (checkout the DAO objects in the MSDN), or you can use the VisData add-in for VB which is a 'poor-man's' access.

    The MDB database is a part of the Jet-Database engine which Access is a front-end for - the Jet-Database engine is part of the standard installation (professional?) of Visual Basic and has no run-time royalties.


    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

  4. #4
    Join Date
    Aug 1999
    Location
    US, Florida
    Posts
    817

    Re: how to....

    Ok I used VisData to create mdb file but how do i save new-made mdb file? i keep on getting errors that file neither is open, etc.
    Thanks

    Programs and requests for them for FREE.
    http://falstok.fly.to

  5. #5
    Join Date
    Dec 1999
    Posts
    20

    Re: how to....

    i did not know that. Thanks Cris.
    Every day, I learn something new.
    Again Thanks


  6. #6
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: how to....

    If you want to create a database through code, you'll need to read up on the methods and properties of the DAO (there's just way to many to post here).

    Here's a quick example :


    '
    Dim NewDB as DataBase
    '
    set NewDB = Workspaces(0).CreateDatabase("c:\newdb.mdb", dbLangGeneral)
    '




    You'll have to then create all the tables, fields, indexes etc by code also.

    If you want to cheat, there's an excellent (free) program over at : http://www.smithvoice.com that will analyse an existing mdb database, and then create all the VB code required to re-create it (so you can just paste it into the code). I've just looked at their site (they've redesigned it) and there's lots of other cool DB code on there - well worth a look.



    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

  7. #7
    Join Date
    Aug 1999
    Location
    US, Florida
    Posts
    817

    Re: how to....

    LOL, why do you call this program a "cheat" program?

    Programs and requests for them for FREE.
    http://falstok.fly.to

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