DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4
  1. #1
    Bill Raines Guest

    Form recordsets that Are independant Of their Source


    I am trying to Build a Component that Uses a DataSource Class and a Form.

    How do I create an ADO recordset #2 on the form that is based on an ADO Recordset
    #1 supplied by a DataSource Class? The Forms Recordset #2, once created,
    should be Completely Independent of the Original Recordset #1 provided by
    the Class ( IE if the Classes Recordset #1 Changes with its own process.
    The Forms Recordset #2 Stays the Same, at least until I want to Update
    it to the Recent process)
    1 - The Form will have a series of Unbound Lists on it that will be populated
    with data from the Form’s Recordset #2. The Lists will be changed many times
    without changing the Form’s Recordset which was built from the provided by
    the class. I actually want to close the class and continue to use the form.

    2 - The Class generates a Recordset #1 based on Peramiters sent from the
    Form at the time that the Form Request a new Recordset #1
    3 – the Class may even close until it is needed again


  2. #2
    Bill Vaughn Guest

    Re: Form recordsets that Are independant Of their Source


    I would try persisting the Recordset to a Stream (2.5 and later) and re-hydrate
    it from that Stream. However, persisting to an XML file might give you more
    independence. I assume you already tried the Clone method and weren't happy
    with that...

    bv

    "Bill Raines" <2braines@concentric.net> wrote:
    >
    >I am trying to Build a Component that Uses a DataSource Class and a Form.
    >
    >How do I create an ADO recordset #2 on the form that is based on an ADO

    Recordset
    >#1 supplied by a DataSource Class? The Forms Recordset #2, once created,
    > should be Completely Independent of the Original Recordset #1 provided

    by
    >the Class ( IE if the Classes Recordset #1 Changes with its own process.
    > The Forms Recordset #2 Stays the Same, at least until I want to Update
    >it to the Recent process)
    >1 - The Form will have a series of Unbound Lists on it that will be populated
    >with data from the Form’s Recordset #2. The Lists will be changed many

    times
    >without changing the Form’s Recordset which was built from the provided

    by
    >the class. I actually want to close the class and continue to use the form.
    >
    >2 - The Class generates a Recordset #1 based on Peramiters sent from the
    >Form at the time that the Form Request a new Recordset #1
    >3 – the Class may even close until it is needed again
    >



  3. #3
    Bill R Guest

    Re: Form recordsets that Are independant Of their Source


    Thanks for looking at my Problem. -BUT-
    1 - I am unfamiliar with "persisting the Recordset to a Stream".
    2 - No I have not tries a Clone, doesnt the Clone retain the same level of
    dependance as the original Recordset Does on its creator?
    3 - I assume I can build the second Recordset with a Loop through the First
    Recordset using AddItem. But this approach is similar to building an array
    and I wonder about the Benifits of an Array vs an ADO Recordset in this situation.
    Further I do build a Second Recordset How do I Pass it someplace without
    it being dependant on the Passing Module or Procedure.

    thanks again

    "Bill Vaughn" <billva@microsoft.com> wrote:
    >
    >I would try persisting the Recordset to a Stream (2.5 and later) and re-hydrate
    >it from that Stream. However, persisting to an XML file might give you more
    >independence. I assume you already tried the Clone method and weren't happy
    >with that...
    >
    >bv
    >
    >"Bill Raines" <2braines@concentric.net> wrote:
    >>
    >>I am trying to Build a Component that Uses a DataSource Class and a Form.
    >>
    >>How do I create an ADO recordset #2 on the form that is based on an ADO

    >Recordset
    >>#1 supplied by a DataSource Class? The Forms Recordset #2, once created,
    >> should be Completely Independent of the Original Recordset #1 provided

    >by
    >>the Class ( IE if the Classes Recordset #1 Changes with its own process.
    >> The Forms Recordset #2 Stays the Same, at least until I want to Update
    >>it to the Recent process)
    >>1 - The Form will have a series of Unbound Lists on it that will be populated
    >>with data from the Form’s Recordset #2. The Lists will be changed many

    >times
    >>without changing the Form’s Recordset which was built from the provided

    >by
    >>the class. I actually want to close the class and continue to use the

    form.
    >>
    >>2 - The Class generates a Recordset #1 based on Peramiters sent from the
    >>Form at the time that the Form Request a new Recordset #1
    >>3 – the Class may even close until it is needed again
    >>

    >



  4. #4
    Bill Vaughn Guest

    Re: Form recordsets that Are independant Of their Source


    I discuss persistence at great length in the new book, but try this

    rs.Save "c:\myfile", adPersistXML

    and later
    rs.Open "c:\myfile"

    This is the simplest form and requires only ADO 2.1. If you have 2.5 you
    can eliminate the file and persist to a Stream object and open from a Stream.
    See the Stream object in MSDN--it has a rudimentary example that should help.

    bv

    "Bill R" <2braines@concentric.net> wrote:
    >
    >Thanks for looking at my Problem. -BUT-
    >1 - I am unfamiliar with "persisting the Recordset to a Stream".
    >2 - No I have not tries a Clone, doesnt the Clone retain the same level

    of
    >dependance as the original Recordset Does on its creator?
    >3 - I assume I can build the second Recordset with a Loop through the First
    >Recordset using AddItem. But this approach is similar to building an array
    >and I wonder about the Benifits of an Array vs an ADO Recordset in this

    situation.
    > Further I do build a Second Recordset How do I Pass it someplace without
    >it being dependant on the Passing Module or Procedure.
    >
    >thanks again
    >
    >"Bill Vaughn" <billva@microsoft.com> wrote:
    >>
    >>I would try persisting the Recordset to a Stream (2.5 and later) and re-hydrate
    >>it from that Stream. However, persisting to an XML file might give you

    more
    >>independence. I assume you already tried the Clone method and weren't happy
    >>with that...
    >>
    >>bv
    >>
    >>"Bill Raines" <2braines@concentric.net> wrote:
    >>>
    >>>I am trying to Build a Component that Uses a DataSource Class and a Form.
    >>>
    >>>How do I create an ADO recordset #2 on the form that is based on an ADO

    >>Recordset
    >>>#1 supplied by a DataSource Class? The Forms Recordset #2, once created,
    >>> should be Completely Independent of the Original Recordset #1 provided

    >>by
    >>>the Class ( IE if the Classes Recordset #1 Changes with its own process.
    >>> The Forms Recordset #2 Stays the Same, at least until I want to Update
    >>>it to the Recent process)
    >>>1 - The Form will have a series of Unbound Lists on it that will be populated
    >>>with data from the Form’s Recordset #2. The Lists will be changed many

    >>times
    >>>without changing the Form’s Recordset which was built from the provided

    >>by
    >>>the class. I actually want to close the class and continue to use the

    >form.
    >>>
    >>>2 - The Class generates a Recordset #1 based on Peramiters sent from the
    >>>Form at the time that the Form Request a new Recordset #1
    >>>3 – the Class may even close until it is needed again
    >>>

    >>

    >



Similar Threads

  1. runtime.exec()
    By Seb in forum Java
    Replies: 7
    Last Post: 10-18-2005, 05:14 PM
  2. Xindice query
    By nonolap in forum XML
    Replies: 0
    Last Post: 05-26-2005, 04:10 AM
  3. Replies: 0
    Last Post: 04-11-2002, 06:48 PM
  4. Open source projects, open source resources
    By Anonymous in forum Open Source
    Replies: 0
    Last Post: 01-29-2002, 09:41 PM
  5. Joining 2 recordsets together to form one
    By Anthony Ryan in forum VB Classic
    Replies: 0
    Last Post: 09-16-2001, 07:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links