Solved

CDaoRecordSet SetFieldValue Performance

Posted on 1999-01-28
7
282 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 112
repeatEnd java challenge 42 85
Making an alias 7 115
moto 4g phone enable finger print 4 48
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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