Re: Module / Class to access database
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Thu, 15 Sep 2005 11:30:51 -0500
"Weavedev" <Weavedev@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5D9B6A85-3093-4610-A5A0-702D0153C5FE@xxxxxxxxxxxxxxxx
> Well, in reply to both of you' I would actually like to do this using a
code
> only method. Rather than using ADO and DAO components. Neither the
> DataEnvironment.
>
> Thanks
>
>
> "Veign" wrote:
>
> >
> > "Ralph" <nt_consulting64@xxxxxxxxx> wrote in message
> > news:ZZOdnUTFVqB6hLXeRVn-jg@xxxxxxxxxxxxxxx
> > >
> > > "Weavedev" <Weavedev@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > > news:63B68E4E-A5A4-4887-9C4E-E74DCD334892@xxxxxxxxxxxxxxxx
> > > > Hi
> > > >
> > > > I'm doing an application with VB 6. Need to create a module or a
class
> > to
> > > > access the MS Access database that I'm using. So that I can use the
> > > methods
> > > > in that class to access and manipulate the database.
> > > >
> > > > Please let me know of any material which may help me to get this
done.
> > > >
> > > > Thanks
> > >
> > > You probably need to be a little clearer on what you want. Both the
DAO
> > and
> > > ADO data object libraries do exactly what you are requesting.
> > >
> > > The DataEnvironment is class built ontop of ADO (kind of a ADO-Lite)
that
> > > may also be appropriate.
> >
> > I would stay away from the DataEnvironment as it has limitations and
just
> > adds several dependencies to the application. I would recommend
learning
> > the code-only way so the OP doesn't fall into the trap of using the
> > DataEnvironment.
> >
> > Just my .02
> >
> > >
> > > hth
> > > -ralph
> > >
> > >
> >
> > --
> > Chris Hanscom - Microsoft MVP (VB)
> > Veign's Resource Center
> > http://www.veign.com/vrc_main.asp
> > --
> >
> >
> >
Well, I won't say it is impossible just d**n inconvenient to do so. If you
were using C/C++ you could talk directly to the Jet engine, but why?
As you said in your OP, "[I] Need to create a module or a class to access
the MS Access database". That is exactly what the DAO and ADO data 'access'
libraries provide. The alternative is to use MSAccess automation, but even
then you will likely be using one or the other object libraries.
Several years ago I was involved with a project to 'speed' up a client
server application, by converting to whole suite to C++ and using OLE DB
directly. The app did turn out marginally 10-15% faster, but almost all of
that came from being written in C++. When it came down to our nifty OLE DB
routines - they weren't much faster and in many cases slower, until we
stubbled on some optimizations that were already in use in the published ADO
libraries. Wire wait time was the same, file i/o was the same, we
accomplished little but getting paid to find out that overall it wasn't
worth getting paid to do it. <g>
There were a few exceptions for some processes. And we did learn where to
apply OLE DB and where not to bother. But I walked away with the general
feeling unless you had a major business reason to go there, don't.
That is just a long-winded way of saying, don't go off and pre-optimize, use
the simplest tools available. If something turns out to be a problem then
address it.
For best access to MSAccess use DAO.
-ralph
.
- References:
- Re: Module / Class to access database
- From: Ralph
- Re: Module / Class to access database
- From: Veign
- Re: Module / Class to access database
- Prev by Date: Looking for the best method. (Your experiences using ODBC wanted)
- Next by Date: Re: Module / Class to access database
- Previous by thread: Re: Module / Class to access database
- Next by thread: Re: Module / Class to access database
- Index(es):
Relevant Pages
|