Results 1 to 5 of 5

Thread: mdi help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    163

    mdi help

    While using doc view to manipulate table data we have to use doc.How to use doc when we have more the one table in database and have to manipulate?
    Purushottam

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Eh? Could you explain more clearly please? I assume you use MFC, but you might want to mention that too.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    163
    Yes I am usiing mfc doc-view Architecture. To manipulate a table we have to use a document class and a viewclass.What should I do when there are more then one table to manipulate?Do I have to create more then one document class or I can use same document but have to create more views?
    Thank You
    Purushottam

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    163
    I want to know to make myself comfort in doc-view architecture.So how to get the answer of above question?
    Thanks
    Purushottam

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    You have a few options for this. You could have one doc and one view class and write the view so it adjusts for different tables. This way you could even view tables that you didn't know of.
    If you know the structure of all tables the above would be much work for little gain. You can instead have one doc class and several view classes, thus you have several document templates that all reference the same doc class but several view classes.
    The problem is that the doc class will become very large. Third option is to have n doc and n view classes with n doc templates connecting them.
    This needs some tweaking, as you might discover that the various views and documents will share a lot of code. I recommend you derive one class from CDocument and one from CRecordView (or CDaoRecordView) where you'll put functionality you know will be common. Then you derive several classes from those two classes. I think that's the best approach.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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