Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Updating the CRecordset variable components

Posted on 2002-03-26
4
Medium Priority
?
186 Views
Last Modified: 2013-11-20
I have to update my  recordset classes
While updateing some recordsets return a message:
"Selected data source does not contain all the columns you recordset class needs"
If I simply continue , when I compile and run the program ,  I get an error message " too few params-expecting  n" (which means what???)
The approach I am using is to delete the offending recordset class along with  the clw file and add the recordset class again getting the necessary columns.
I'm just wondering if there is an easier way (ie mass delete the entire variable list and rebuild it).
There are over 50 columns in some recordset's so just comparing and deleting is a daunting task!
Txs


0
Comment
Question by:dooley090698
  • 2
4 Comments
 
LVL 3

Expert Comment

by:GGRUNDY
ID: 6898150
Have a look in the "Member Variables" tab of the MFC Class Wizzard. When you have selected one of your recordsets in the "Class Name" field, does the "Update Columns" or "Bind All" buttons do what you want?
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 400 total points
ID: 6898159
After I make some modifications to a database table, I usually just use the classwizard to manually delete all previous bindings (select each one and delete it).  Then I use the [Bind all] button to set up the variables.  This is good if you use the ClassWizard's default naming convention (m_EXACTFIELDNAME) so that is the best naming convention to use.

Is there a faster way?  Yes.  Edit your CRecordset-derived source .H and .CPP files and delete all of the lines of code in the ClassWizard-maintained blocks.  But even with a large recordset, the click-and delete is pretty fast.

-- Dan
0
 

Author Comment

by:dooley090698
ID: 6907489
Dan,
I followed your delete each variable in the CW and worked just fine.
Txs
BTW - how'd you get so smart :)
*me bows..humbled by the Great God of Knowledge * :)
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6907707
>>BTW - how'd you get so smart :)
I eat peanuts.  Lots of them.  It's brain food.
 
But in this case, it is just experience.  This is one of the first problems people experience when using the ClassWizard with CRecordset classes.  The error message is way confusing.  One of the first things I tried was to simply start over by manually deleting.  If you have ever written Wizard-style (step-by-step, U/I-related) programs, you know that it is nearly impossible to take all things into consideration and that is often possible to "help the Wizard" by starting with a clean slate (in a known state).

-- Dan
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month21 days, 1 hour left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question