Results 1 to 2 of 2

Thread: Passing Strings to a Recordset Located in a Class

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Location
    North Carolina
    Posts
    14

    Question Passing Strings to a Recordset Located in a Class

    Could someone give me some code for passing strings to a recordset that was connected in a class.

    Example:
    strLastName to this recorset in a class - rsHelpDesk!LastName


    I have been able to pass info Read only(property get), but can not write to the DB.

    Thank You

  2. #2
    Junior Member robinm's Avatar
    Join Date
    May 2001
    Location
    London
    Posts
    19
    there are two ways to do this.

    1)1 Define a number of Properties for the recordset class that are public Let (get if you also want to read them)
    2 Assign the Surname ForeName etc to the properties of the
    recordset class.
    3 To assign them to the recordset use the pre set property ;

    rsHelpDesk!LastName = Surname
    rsHelpDesk!LastForeName = ForeName ..... etc etc


    2) 1 Use no properties (Stateless class)

    2 Define a public Method in the recordset class that accepts all
    the values for the recordset .

    ie . Public Function AddRecord(byval ForeName as string, byVal
    _SurName as string.... etc etc etc)

    rsHelpDesk!LastName = Surname
    rsHelpDesk!LastForeName = ForeName ....etc etc

    Any questions mail me.
    To imitate is human... to copy without recognition is theft.

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