Results 1 to 2 of 2

Thread: Database and vb6

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 1999
    Location
    Blacksburg, VA,, USA
    Posts
    5

    Post

    ok here is what i want to do is to be able to write to a mdb file how can i go about doind this with in my database app
    thanks

  2. #2
    Lively Member
    Join Date
    Mar 1999
    Posts
    93

    Post

    There are several ways to access .mdb file. The most convenient is using DAO.

    Add reference to MS DAO 3.xx to your project

    Add the following into your declarations secton

    Dim db as database
    Dim rs as recordset

    Here's the code to open database

    Set db= opendatabase("yourFileName")
    set rs = db.openrecordset("Select ListOfFields From TableName Where ... Order by ...", dbOpenDynaset (or table or snapshot)

    Now the data you need is entered into recordset.

    If you have any problems, see VB help.

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