Re: Fastest record create method with JET 4.0




"pauladams777" <pauladams777@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3BC7659E-FA67-41CF-AD4A-FF30224AD493@xxxxxxxxxxxxxxxx
See interleaved below...

"Ralph" wrote:

Are you talking about using DAO in C++?

Yes - DAO in C++.

There are DAO classes in MFC. (Look up CDaoDatabase, CDaoWorkspace,
....).

Unfortunately, in Borland C++, not Microsoft...

Here is something you might find interesting. It was written to show how
to
convert DAO to ADO, but as you already know ADO you can read it
'backwards'
so to speak. It does point out all the basic differences.

That was informative, but without the matching MFC, somewhat obscure...

The DAO contains a ton of collections. They are the *Key* to getting the
most out of DAO. Easiest way to learn is just define one and go play.

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaroffdev/html/godao.asp

DAO with a local (or near <g>) MS Access database will be quicker. But
unless you are careful, it is very easy to write very inefficient code.
Unlike using ADO where there is often only one way, there are often
multple
ways with subtle differences in DAO. (That's why you want to become good
friends with the collections named above.)

So if your first effort is a dog - Don't Panic! Open up the profiler and
go
looking. <g>

[If this doesn't work out. Next step is using OLE DB directly with the
Jet
4.0 for OLE DB provider. Which is only about 10/15% slower. But still
magnitudes faster than Automation.]

Anyway, hopes this helps.
-ralph

Thanks Ralph - all those tips are sure to come in handy!


Sorry to hear you are using Borland C++. [Surprised to learn those compilers
are still around. I thought you all had gone Java by now. <G>]

Would truly have been easier with MFC.

BUT, All is not lost - take a look at these articles...
http://www.codeguru.com/cpp/data/mfc_database/dao/article.php/c10359/
http://www.codeguru.com/cpp/data/mfc_database/dao/article.php/c4279/

As you will notice you don't need a wrapper, you can still use DAO directly
or write your own, it will be a mildly tougher ferreting out info, that's
all, but can be done. I know I have seen articles showing how to use OLE DB
from Borland, so there must be some DAO stuff out there as well.

Just need to dig deeper.

Give it a try. If you get stuck holler back.

-ralph


.



Relevant Pages

  • RE: DBase 5 import trouble
    ... If that doesn't work search for "Borland" file folder and rename ... to run, so this will enable you to let DAO, which is probably the best DBase ... I would also try Dbase 4. ...
    (microsoft.public.access.externaldata)
  • Re: DAO - PL/SQL question
    ... We have a Oracle PL/SQL stored procedure that returns 2 varchars. ... It has to be DAO only and not ADO. ... Thanks for your response Ralph, No we are not using DAO in VB.NET. ... Hijacking error handling can be a viable option in the sense you can get it ...
    (microsoft.public.vb.database)
  • RE: Close database
    ... >>Thanks Ralph for a quick response. ... > database name".close ... > Ã,«frontÃ,» mdb ... > and DAO are you using? ...
    (microsoft.public.vb.database.dao)