PC Review


Reply
Thread Tools Rate Thread

Is it ok to open/close several times an ADO connection?

 
 
The Dude
Guest
Posts: n/a
 
      24th Oct 2008
Hi guys,

I had a quick question regarding programming etiquette:

I have a table of about 100 adresses to match in a 500.000 records table. In
order to make the recordset smaller I obviously want to filter the big table,
by ZIP code for this example.
I have tried a recordset.filter method once opened but I can't make it work,
so instead I use an SQL filter while opening the connection... something like
"Select * From [table] Where ZipCode Between XX000 and XX999".

It makes the whole algorithm MUCH faster, but it makes me open and close the
connection each time I move to the next address to match (that is from 10 to
500 times in the same procedure).
Would that be a problem of any kind? It is a single user table, on my local
drive, but would it be a problem with a multi user database?

Thanks for this AMAZING forum. You guys rule.
T_D
 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      24th Oct 2008
Hi,
do not see any problem with this. Also in most cases filtering with SQL,
like you do, is faster the filtering with recordset

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com


"The Dude" <f_com2°AT°yahoo°DOT°fr> wrote in message
news:8BAA782B-52B8-49FA-92C2-(E-Mail Removed)...
> Hi guys,
>
> I had a quick question regarding programming etiquette:
>
> I have a table of about 100 adresses to match in a 500.000 records table.
> In
> order to make the recordset smaller I obviously want to filter the big
> table,
> by ZIP code for this example.
> I have tried a recordset.filter method once opened but I can't make it
> work,
> so instead I use an SQL filter while opening the connection... something
> like
> "Select * From [table] Where ZipCode Between XX000 and XX999".
>
> It makes the whole algorithm MUCH faster, but it makes me open and close
> the
> connection each time I move to the next address to match (that is from 10
> to
> 500 times in the same procedure).
> Would that be a problem of any kind? It is a single user table, on my
> local
> drive, but would it be a problem with a multi user database?
>
> Thanks for this AMAZING forum. You guys rule.
> T_D


 
Reply With Quote
 
 
 
 
The Dude
Guest
Posts: n/a
 
      24th Oct 2008
ok cool
thanks Alex

"Alex Dybenko" wrote:

> Hi,
> do not see any problem with this. Also in most cases filtering with SQL,
> like you do, is faster the filtering with recordset
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://accessblog.net
> http://www.PointLtd.com
>
>
> "The Dude" <f_com2°AT°yahoo°DOT°fr> wrote in message
> news:8BAA782B-52B8-49FA-92C2-(E-Mail Removed)...
> > Hi guys,
> >
> > I had a quick question regarding programming etiquette:
> >
> > I have a table of about 100 adresses to match in a 500.000 records table.
> > In
> > order to make the recordset smaller I obviously want to filter the big
> > table,
> > by ZIP code for this example.
> > I have tried a recordset.filter method once opened but I can't make it
> > work,
> > so instead I use an SQL filter while opening the connection... something
> > like
> > "Select * From [table] Where ZipCode Between XX000 and XX999".
> >
> > It makes the whole algorithm MUCH faster, but it makes me open and close
> > the
> > connection each time I move to the next address to match (that is from 10
> > to
> > 500 times in the same procedure).
> > Would that be a problem of any kind? It is a single user table, on my
> > local
> > drive, but would it be a problem with a multi user database?
> >
> > Thanks for this AMAZING forum. You guys rule.
> > T_D

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I wnat to copy several Worksheets, Several Times... =?Utf-8?B?RHIuIERhcnJlbGw=?= Microsoft Excel Programming 13 2nd Aug 2007 11:20 AM
Specific date and time to print several reports, several times Charles Phillips Microsoft Access Reports 2 17th Nov 2006 06:36 PM
how do I set up appt recurring several times/day for several days =?Utf-8?B?U2FsbHk=?= Microsoft Outlook Calendar 1 28th May 2006 08:14 PM
MSIE crashes several times each times johan Windows XP Internet Explorer 2 2nd Jul 2004 07:22 AM
Re: summary lookupvalue if it appears several times several times dvt Microsoft Excel Worksheet Functions 0 8th Aug 2003 09:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:32 AM.