Results 1 to 4 of 4

Thread: Passing Recordsets to classes

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 1999
    Location
    Belfast
    Posts
    254

    Post

    Hello,
    could anyone tell me what is the most effective ways to pass a recordset to a function.

    Normally I wiuld pass it a an adodb.recordset
    in the parameter listing, but would like to know if there is a tidier way of doing this?

    Thanks

    Tony.

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Posts
    253

    Post

    I think the way you use is the best! Passing a variable to a function or procedure by using a parameter is the most structured way there is and every programmer should use it!

  3. #3
    Lively Member
    Join Date
    Jul 1999
    Posts
    78

    Post

    Forest, could you elaborate on the proper way to do this, with a small code example?

    I'm afraid I stink with Parameters, and never quite got the hang of why/when.

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    Code:
    Public Sub MySubroutine(objRS as Adodb.Recordset)
    
        Msgbox objRS.fields(0).value
    
    End Sub

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