Complex Data Consumer Data Aware Classes


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Complex Data Consumer Data Aware Classes

  1. #1
    Desmond Cassidy Guest

    Complex Data Consumer Data Aware Classes


    Hi Deborah,
    I have written to you before (you may remember) and maybe this platform
    might yield an answer to the problem I posed some time ago...who knows, maybe
    with some other interested parties.

    Scenario: Data Source Class, Data Consumer Complex Class and a piece of
    Main Code doing the instantiating and binding. I Bind the DataSource to the
    BindingCollection.DataSource and 'try' to bind 'something' from the DataConsumer
    to the BindingCollection.

    In coding a Complex Data Consumer, I followed the 2 'starter' templates
    provided by yourself (at InStep) and Microsoft. In both of the templates
    there are a LET/GET of a DataMemeber Property and a SET/GET of a DataSource
    Property. This coding seems to be pretty much standard in so far as what
    it does, however the outstanding issues I have at the moment are the
    a) Binding Collection syntax
    b) and thus the Jump from the DataSource Class when 'something' happens.

    Now, here is the information from Microsoft (Forms and Data-Aware Controls
    VB Concepts).
    >>>>>>>>>>

    However, for complex data consumers such as the DataGrid, the DataField and
    DataFormat properties arenít required, as the control handles them for you.

    >>>>>>>>>>

    This would seem to suggest that the DataField should not be passed when binding
    the Complex Data Consumer to the Binding Collection as in theory we are dealing
    with a RowSet rather than an individual field with 'this' Data Consumer.


    And here is the conundrum...If in a Simple Data Consumer, as
    soon as a Property Changes the Binding Collection wakes up the Data Consumer
    because...
    1. UpdateMode BindingCollection is vbUpdateWhenPropertyChanges (Note: vbUpdateWhenRowChanges
    naturally works also)
    2. Recognises the DataField that was bound.

    Now if in the Complex DataConsumer the UpdateMode was indeed changed to vbUpdateWhenRowChanges
    then when the DataSource carries out a .MoveNext the DataConsumer Code should
    be entered 'Somewhere'....And that 'Somewhere' is the Real Question....

    Deborah, this may sound like a scratchy record but just like you said on
    one of your previous postings that you handle all Data Access in one 'Module'
    and change Business Objects per project, the use of this Complex Data Consumer
    would I'm sure help with the overall Object Oriented Approach that we are
    endeavoring to adopt.

    Regards,

    Desmond.


    Share on Google+

  2. #2
    Deborah Kurata Guest

    Re: Complex Data Consumer Data Aware Classes

    Hi Desmond -

    Someone else asked about this in this newsgroup and were referred to a VBPJ
    article that someone else wrote. You may want to check that out.

    Good luck!
    Deborah

    Desmond Cassidy wrote in message <38fc1b99$1@news.devx.com>...
    >
    >Hi Deborah,
    > I have written to you before (you may remember) and maybe this platform
    >might yield an answer to the problem I posed some time ago...who knows,

    maybe
    >with some other interested parties.
    >
    > Scenario: Data Source Class, Data Consumer Complex Class and a piece of
    >Main Code doing the instantiating and binding. I Bind the DataSource to the
    >BindingCollection.DataSource and 'try' to bind 'something' from the

    DataConsumer
    >to the BindingCollection.
    >
    > In coding a Complex Data Consumer, I followed the 2 'starter' templates
    >provided by yourself (at InStep) and Microsoft. In both of the templates
    >there are a LET/GET of a DataMemeber Property and a SET/GET of a DataSource
    >Property. This coding seems to be pretty much standard in so far as what
    >it does, however the outstanding issues I have at the moment are the
    >a) Binding Collection syntax
    >b) and thus the Jump from the DataSource Class when 'something' happens.
    >
    >Now, here is the information from Microsoft (Forms and Data-Aware Controls
    >VB Concepts).
    >>>>>>>>>>>

    >However, for complex data consumers such as the DataGrid, the DataField and
    >DataFormat properties arenít required, as the control handles them for you.
    >
    >>>>>>>>>>>

    >This would seem to suggest that the DataField should not be passed when

    binding
    >the Complex Data Consumer to the Binding Collection as in theory we are

    dealing
    >with a RowSet rather than an individual field with 'this' Data Consumer.
    >
    >
    >And here is the conundrum...If in a Simple Data Consumer, as
    >soon as a Property Changes the Binding Collection wakes up the Data

    Consumer
    >because...
    >1. UpdateMode BindingCollection is vbUpdateWhenPropertyChanges (Note:

    vbUpdateWhenRowChanges
    >naturally works also)
    >2. Recognises the DataField that was bound.
    >
    >Now if in the Complex DataConsumer the UpdateMode was indeed changed to

    vbUpdateWhenRowChanges
    >then when the DataSource carries out a .MoveNext the DataConsumer Code

    should
    >be entered 'Somewhere'....And that 'Somewhere' is the Real Question....
    >
    >Deborah, this may sound like a scratchy record but just like you said on
    >one of your previous postings that you handle all Data Access in one

    'Module'
    >and change Business Objects per project, the use of this Complex Data

    Consumer
    >would I'm sure help with the overall Object Oriented Approach that we are
    >endeavoring to adopt.
    >
    >Regards,
    >
    >Desmond.
    >
    >



    Share on Google+

  3. #3
    Phil Weber Guest

    Re: Complex Data Consumer Data Aware Classes

    > Someone else asked about this in this newsgroup
    > and was referred to a VBPJ article that someone else
    > wrote. You may want to check that out.


    Desmond: I believe the article to which Deborah refers is "Supercharge Data
    Binding" in the March, 2000 issue of VBPJ
    ( http://www.devx.com/upload/registere...ar00/kf0300/kf
    0300.asp ).
    ---
    Phil Weber


    Share on Google+

  4. #4
    Desmond Cassidy Guest

    Re: Complex Data Consumer Data Aware Classes


    Phil, Deborah,
    Thanks for the pointer to the article. I have read just about every article
    there is available on this particular subject BUT without referring to what
    I am 'really' asking and that is "Binding a DataSource to a Complex Bound
    Data Consumer". The key issue being binding the Complex Data Consumer to
    the Binding Collection AND the events in the Data Source that will FIRE the
    DataConsumer into Action. I am just wondering if Keith Franklin ( who wrote
    that article on Supercharge Data-Binding) may be listening in on this conversation.

    Again anyone out there who has either seen, know how to do it or even come
    back with a 'Yeah, its like Zen, simple but not easy, do it with this approach'
    most definitely would be appreciated.

    Best Regards,

    Desmond.


    "Phil Weber" <pweber@teleport.com> wrote:
    > > Someone else asked about this in this newsgroup
    > > and was referred to a VBPJ article that someone else
    > > wrote. You may want to check that out.

    >
    >Desmond: I believe the article to which Deborah refers is "Supercharge Data
    >Binding" in the March, 2000 issue of VBPJ
    >( http://www.devx.com/upload/registere...ar00/kf0300/kf
    >0300.asp ).
    >---
    >Phil Weber
    >
    >


    Share on Google+

Similar Threads

  1. Save Image to Field
    By Chicho in forum VB Classic
    Replies: 11
    Last Post: 10-01-2003, 01:00 AM
  2. BOND CONTROLS vs. UNBOND CONTROLS
    By saly in forum VB Classic
    Replies: 12
    Last Post: 02-02-2003, 12:27 AM
  3. vbComplexBound Data Consumer Class
    By Larry Williams in forum VB Classic
    Replies: 0
    Last Post: 07-06-2000, 11:19 AM
  4. About Data aware ListBox ......
    By TOM LENG in forum VB Classic
    Replies: 0
    Last Post: 06-14-2000, 04:50 AM
  5. Data bound classes and number of tables
    By leonardo in forum authorevents.kurata
    Replies: 3
    Last Post: 04-18-2000, 12:44 PM

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center