Solved

CDaoRecordSet SetFieldValue Performance

Posted on 1999-01-28
7
273 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
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now