|
-
Dec 1st, 2002, 10:56 PM
#1
Thread Starter
Addicted Member
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?
-
Dec 2nd, 2002, 07:14 AM
#2
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.
-
Dec 2nd, 2002, 09:39 PM
#3
Thread Starter
Addicted Member
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
-
Dec 15th, 2002, 11:14 PM
#4
Thread Starter
Addicted Member
I want to know to make myself comfort in doc-view architecture.So how to get the answer of above question?
Thanks
-
Dec 16th, 2002, 05:31 AM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|