Simon Agerbo
12/2/2005 8:26:00 AM
Well. As far as I know the JET OLE Db engine should perform just as fast as
the odbc driver. I do not think that it will run any faster with the runon
"server" property set. Maybe your select statement to MS Access has bad
performance.
Here are some of the steps I can recommend:
1. Create an MS Access index on the fields, that you use in the "where"
clause of your select statement.
2. if you don't want to update the Access record you retrieve, then open the
database in readonly mode. use "mode=Read" instead of ReadWrite
3. I do not know if is possible, but try to use the Forward-only cursor on
the ADO recordset.â?? allows you to only scroll forward through the Recordset.
Additions, changes, or deletions by other users will not be visible. This
improves performance in situations where you need to make only a single pass
through a Recordset.
Hopefully this can bring you further
regards
Simon Agerbo
"Newbee" wrote:
> That worked - thank you!
>
> One thing though; it is taking a good 10 seconds to open the connection and
> retrieve the data (selecting a single record from a table of about 75K rows).
> I had to set the RunOn property of the class to "Called from" in order to
> successfully connect to the database; do you think it would run faster if I
> could get it to work while the RunOn property was set to "Server"?
>
> "Simon Agerbo" wrote:
>
> > Hi
> >
> > You could also try to use an ADO connection instead of OBDC. An ADO
> > connection uses the microsoft JET OLE DB provider to connect directly to the
> > Access database and it doesn't use DSN. Take a look at classes CCADO*
> > and discussion 10250.7 for an example.
> >
> > your connectionstring to Access should look something like this
> >
> > Adocon.open(Provider=Microsoft.Jet.OLEDB.4.0;Password='';User
> > ID='Admin';Data Source='<your mdb file>';Mode='ReadWrite';Jet OLEDB:Engine
> > Type=4")
> >
> > regards
> >
> > Simon Agerbo
> >
> > "Newbee" wrote:
> >
> > > Is there a way to connect to an Access database from Axapta without using a
> > > DSN? I've created a DSN for the database in question on our Axapta server,
> > > but that didn't work. If I create a DSN on my local machine it works, but
> > > I'd like to avoid having to create a DSN on the local machine of every end
> > > user.
> > >
> > > Thanks in advance!
> > >