Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CDaoRecordSet SetFieldValue Performance

Posted on 1999-01-28
7
Medium Priority
?
289 Views
Last Modified: 2013-11-20
I have a CDaoRecordSet derived class and sometimes when I perform a setfieldvalue on it it is really fast any other times it can take 6 or 7 seconds (measured using beep()).
It has 200 fields and the delay happens in the same place all the time. I open it using Open().
0
Comment
Question by:johnallen1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 

Expert Comment

by:jdev011599
ID: 1328430
What is the field type? Database? If I have more info maybe I can help.

regards,
jdev
0
 
LVL 2

Expert Comment

by:rayb
ID: 1328431
200 fields on one recordset?
I don't remember the numbers or the location of the documentation, but there are some performance notes somewhere in regards to Access databases and field count per table.  The performance starts to break down, I think it was... 40 fields?  You may want to reconsider your database schema and break that table up a bit.  

Also as jdev points out, additional information would be helpful.  Is this the same field all the time that's troubling you?  Is it a memo field?  What about the content that you are trying to stuff into the field?

-Ray

0
 
LVL 4

Expert Comment

by:piano_boxer
ID: 1328432
I'v seen the same thing. Never found the solution to it. Maby its a bug in the CDao* classes.
I have switched to OLE DB in the newest version and I have not seen such problem. So maby you should do the same!
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:johnallen1
ID: 1328433
It doesn't matter which field (type) I try to setfieldvalue for.
It takes about eight seconds for the first field and 1 second for each one after that.
I think my problem is a number of fields. In DAO documentation it says that in the classwizard that when you define a class as bieng derived from cdaorecordset you can name the source table AND the fields to grab in the dynaset. I can name the table but it doesn't ask me which fields. Has anyone seen this? How can it be done?
0
 
LVL 2

Expert Comment

by:rayb
ID: 1328434
I don't know that you can select the fields of the table when you are first creating the class via class wizard.  However, once the class is created, switch to the member variables tab (in class wizard) and delete the members you do not want.

-Ray
0
 

Author Comment

by:johnallen1
ID: 1328435
Rayb,
That worked a treat. the function decreased from 24 seconds per record to 0.8! Good work!
How do I acept the answer so you get your points?
Thanks
John A.
0
 
LVL 2

Accepted Solution

by:
rayb earned 400 total points
ID: 1328436
johnallen1,

You should be able to accept this as the answer.  Thanks very much.

-Ray
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

604 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