Solved

CDaoRecordSet SetFieldValue Performance

Posted on 1999-01-28
7
283 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 100 total points
ID: 1328436
johnallen1,

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

-Ray
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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 this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

729 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