?
Solved

CDaoRecordSet SetFieldValue Performance

Posted on 1999-01-28
7
Medium Priority
?
285 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
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.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

770 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