Re: ADO and the Find method
From: Val Mazur (group51a_at_hotmail.com)
Date: 07/30/04
- Next message: Val Mazur: "Re: ADO and the Find method"
- Previous message: Chris: "Re: Returning results from a temporary table using ADO"
- In reply to: Martin: "Re: ADO and the Find method"
- Next in thread: Martin: "Re: ADO and the Find method"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Jul 2004 22:11:40 -0400
Hi,
You cannot compare DAO and ADO. DAO was designed specifically for using with
Access and takes advantage of it. ADO was designed to work with any
database, which has OLEDB provider. ADO is more flexible. Performance of the
DAO with Access database probably is the only advantage of it comparing with
ADO
-- Val Mazur Microsoft MVP "Martin" <amsterdmr@nospam.hotmail.com> wrote in message news:eQsYj4SdEHA.2268@TK2MSFTNGP12.phx.gbl... > Hmmmm, I'm getting less and less enthousiastic about the transfer to > ADO... > > But thanks for your reply, it provides valuable insight of what's in store > for us. > > Regards, > Martin > > > "Val Mazur" <group51a@hotmail.com> wrote in message > news:uhnRRJSdEHA.244@TK2MSFTNGP12.phx.gbl... >> Hi Martin, >> >> I did it in my application providing some sort of paging. I have loaded > data >> using some amount of records and keeping track of what is loaded. Of > course >> it takes more coding, but final result worth it. Even if you have > thousands >> of customers, you are not able to see that all at once and basically you > do >> not need to load all of them. Another point here is that you cannot > compare >> DAO and ADO, because ADO is not database oriented as DAO and in some >> cases >> works slower >> >> -- >> Val Mazur >> Microsoft MVP >> >> >> "Martin" <amsterdmr@nospam.hotmail.com> wrote in message >> news:OMFZ8%23QdEHA.1656@TK2MSFTNGP09.phx.gbl... >> > Hi Val, >> > >> > So how would you code a window like I described before? (not exact code > of >> > course, but the general idea for a next, previous, first, last and > find). >> > Opening the entire table is how we do it in DAO (and that works fine, > also >> > on tables of more than 500,000 records), and we're in the process of >> > researching what kind of impact a transfer to ADO would have. Judging >> > by >> > what I hear from you, it would mean that we have to do a lot more >> > low-level >> > programming... >> > >> > Regards, >> > Martin >> > >> > >> > >> > "Val Mazur" <group51a@hotmail.com> wrote in message >> > news:OfCf6vQdEHA.2352@TK2MSFTNGP09.phx.gbl... >> >> Hi, >> >> >> >> Opening of the whole table was not a good design anytime. Even if we > have >> >> this option, it does not mean it is a good idea. When database is >> >> small >> > then >> >> it would work fine, but in a case if database is huge, then even with > the >> >> single user you could experience huge performance impact. >> >> >> >> -- >> >> Val Mazur >> >> Microsoft MVP >> >> >> >> >> >> "Martin" <amsterdmr@nospam.hotmail.com> wrote in message >> >> news:%23VcqB$GdEHA.3560@TK2MSFTNGP10.phx.gbl... >> >> > Val, >> >> > >> >> > If opening a whole table is bad design or not depends IMHO on the >> > context. >> >> > If I for instance make a window to allow the user to edit any > customer, >> >> > add >> >> > new ones and delete existing ones, I would surely open the entire > table >> >> > and >> >> > allow the user to navigate by entering a customer number (find) or > give >> > a >> >> > navigational command like First, Previous, Next, Last. >> >> > >> >> > I agree it would also be possible to "remember" in the program code >> >> > what >> >> > my >> >> > last position was and do a new select on the first one that is > bigger, >> > or >> >> > smaller for navigation with a new SELCT, but that seems like a lot >> >> > of >> >> > program overhead and I'd be doing stuff that the DB-Engine should do >> >> > for >> >> > me. >> >> > >> >> > Martin >> >> > >> >> > >> >> > "Val Mazur" <group51a@hotmail.com> wrote in message >> >> > news:O$CczeFdEHA.3512@TK2MSFTNGP12.phx.gbl... >> >> >> Hi, >> >> >> >> >> >> It is a third posting in a row with the same kind of issue today. >> >> >> It >> >> > should >> >> >> work, but main problem here is that you are trying to open the >> >> >> whole >> >> > table, >> >> >> which is a really bad design of the application. Instead of opening >> >> >> recordset on a whole table and then searching it for the value, I >> >> >> would >> >> >> suggest to open recordset using SELECT statement with WHERE clause, >> > which >> >> >> will have same condition. It would improve performance of > application >> > and >> >> >> you will avoid any issues, when provider could lock big amount of >> > records >> >> > in >> >> >> a table. >> >> >> >> >> >> -- >> >> >> Val Mazur >> >> >> Microsoft MVP >> >> >> >> >> >> >> >> >> "Michael Lee" <MichaelLee@discussions.microsoft.com> wrote in > message >> >> >> news:848ADBCB-8A8B-48E9-848B-85F43B0927BD@microsoft.com... >> >> >> > Hi Everyone. >> >> >> > I have opened a ADO recordset as follows: >> >> >> > rsPatients.Open "Patients", ado, adOpenKeyset, adLockOptimistic, >> >> >> > adCmdTable >> >> >> > When I try to use the Find Method: >> >> >> > rsPatients.Find "P_ID = '" & Patientid & "'" >> >> >> > It will not find the record. I'm just going by the EOF property. > If >> > it >> >> > is >> >> >> > true, the Find method was not suppose to find the record. I kow > the >> >> > record >> >> >> > is there. Is this something to do with the Keyset recordset? It >> >> >> > would >> >> >> > be >> >> >> > nice if the help would have included when these methods will >> >> >> > work. > I >> >> > have >> >> >> > found other methods will not work right depending on the >> >> >> > settings. >> >> >> > ANyways, what about this Keyset recordset, Is the Find method >> >> >> > suppose >> >> >> > to >> >> >> > work. Thanks for any help. >> >> >> > Michael Lee >> >> >> > >> >> >> >> >> >> >> >> > >> >> > >> >> >> >> >> > >> > >> >> > >
- Next message: Val Mazur: "Re: ADO and the Find method"
- Previous message: Chris: "Re: Returning results from a temporary table using ADO"
- In reply to: Martin: "Re: ADO and the Find method"
- Next in thread: Martin: "Re: ADO and the Find method"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|