Results 1 to 2 of 2

Thread: Newbie : Openning a MS Access Database

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 1999
    Location
    NY, USA.
    Posts
    240

    Post

    Could some one please give me the parameters for the following.

    (1)OpenDatabase
    (2)OpenRecordset

    I whould like to know how to open a database exclusive or shared. If you could also explain the purpose and ue of :
    (1)dbOpenTable
    (2)dbOpenDynamic
    (3)dbOpenDynaset
    (4)dbOpenSnapshot
    etc.

    any help or example would be gladely appreciated.

    Thanks,
    Omar

    [This message has been edited by omarswan (edited 11-18-1999).]

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    To Open a Database and Recordset..
    Code:
        Dim oDB As Database
        Dim oRS As Recordset
        'Open the DB Exclusively
        'Use False to Open as Shared
        Set oDB = Workspaces(0).OpenDatabase("Biblio.mdb", True)
        Set oRS = oDB.OpenRecordset("SELECT * FROM Authors", dbOpenForwardOnly)
        While Not oRS.EOF
            List1.AddItem oRS("Name")
            oRS.MoveNext
        Wend
        Set oRS = Nothing
        oDB.Close
        Set oDB = Nothing
    dbTable - Opens a Standard Table, giving Access to its Fields.
    dbDynaset - Opens a Linked Table or SQL SELECT, Which can Contain Multiple Field from Multiple Tables and is Fully Editable.
    dbDynamic - ODBC Cursor, Pretty much the same as dbDynaset, except Membership isn't Fixed.
    dbSnapShot - Is a Static Resultset, the Values are Fixed.
    dbForwardOnly - Is the Fastest as it retrieves a ReadOnly, Single Pass Resultset. (Non-Editable).

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [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