Results 1 to 2 of 2

Thread: help

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Philadelphia
    Posts
    47
    i keep trying to write the same damn thing and something is not working here...
    in decl... i have
    global db as database
    global rc as recordset

    right and in my code i have
    set db = DBEngine.OpenDatabase("C:\somefile.mdb")
    set rc = db.openrecordset("main")
    ' which is the table i want to look at

    now i use the recordset once right... and then i try to access it again in another function and get an object error. object invalid or no longer set... now what does this mean?
    U S A
    Visual Studio .NET
    Windows XP

  2. #2
    Guest
    Everytime you open a recordset for example:
    *Database already declared
    Public sql as string
    Public rc as Recordset

    sql = "SELECT * FROM Table WHERE ......."
    set rc = mdb.openrecordset(sql)
    With rc
    ********************
    ********************
    End with

    *Important
    rc.close
    Always remember to close your recordset especially when you
    use a global recordset.

    Joffies

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