Results 1 to 4 of 4

Thread: Class Objects HELP!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    2

    Class Objects HELP!!

    First off, Thanks for helping!!!

    I have a class, in which i have two public functions.

    One says:
    Public Function connect() As Connection
    If blSQL And blPWD And blDB And blUser Then
    With cn
    .ConnectionString = "BLAH"
    .Open
    End With
    Set connect = cn
    End If
    End Function

    The other says:
    Public Function Source(ByVal SourceString) As Recordset
    With rs
    .CursorLocation = adUseClient
    .Source = SourceString
    .Open , cn
    End With
    Set Source = rs
    End Function

    I do a
    cn.connect
    cn.source = "Query"

    DOES ANYONE KNOW HOW TO ACCESS THE RECORDSET INFO?!?

    i can't do a cn! because it's not set up to access that info because I DON'T KNOW HOW

    Any help would TRULY be appreciated!!!

    Thanks again!!

    JC
    If I don't ask, will someone else?

  2. #2
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    I don't understand. What do you mean
    access the recordset info
    Do you mean the data in the recordset.

    VB Code:
    1. set rs = cn.Source("sql select")
    2.  
    3. If Not rs.eof Then
    4.     Msgbox rs.fields(0).value
    5. Else
    6.     Msgbox "no Data found"
    7. End If

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    2

    Talking

    Thank you!!

    Something as trivial as that...ok, I don't know what I was thinking but thank you VERY MUCH!!

    JC
    If I don't ask, will someone else?

  4. #4
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    no problem

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