468,136 Members | 1,473 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,136 developers. It's quick & easy.

Q: Concurrent access to a local DB file

I wrote a Delphi application that accesses a local Access database
using 2 instances of the TADOQuery class. Unfortunately, when I
traverse the DB records using the first TADOQuery instance, the
pointer to the active record maintained by the second TADOQuery
instance is also affected. Is there a way I can force Delphi to use a
seperate pointer to the DB for each instance of my class?

I'm truely a beginner in DB programming, so I apologize if my question
is lowly.

Thanks heaps,
John Fine
Nov 12 '05 #1
3 4163
No, there is no such thing as a lowly question. ;-)
I am not familiar with the TADOQuery class. Is this a class object you
wrote?

However, if you are creating multiple instances of a object, and that object
has it's own recordset, then I can't imagine why using one object would
effect the other. The only possibility here would be that both of your
objects are referencing the same global reocrdset, but that would indeed be
lame.

If you are talking about writing class objects in ms-access, access97 does
allow you to reference the base object without creating new instance of the
object, but this not your problem. (in a2000, you can't do that anymore, as
it is the same as VB6).

Perhaps you are not creating a new instance of the recordset object for each
instance of the object you are using?

--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
ka****@msn.com
http://www.attcanada.net/~kallal.msn
"John Fine" <jo*******@hotmail.com> wrote in message
news:ff*************************@posting.google.co m...
I wrote a Delphi application that accesses a local Access database
using 2 instances of the TADOQuery class. Unfortunately, when I
traverse the DB records using the first TADOQuery instance, the
pointer to the active record maintained by the second TADOQuery
instance is also affected. Is there a way I can force Delphi to use a
seperate pointer to the DB for each instance of my class?

I'm truely a beginner in DB programming, so I apologize if my question
is lowly.

Thanks heaps,
John Fine

Nov 12 '05 #2
la**********@ntpcug.org (Larry Linson) wrote in
<fc**************************@posting.google.com >:
What is often called an "Access database", is most likely a "Jet
database" run by the same Jet database engine that is the default
with Access. Access is, in fact, the direct user interface part
and database application generator part of a DBMS.


I am presently in the process of recreating in Access an
application that was created by a Delphi programmer using an Access
2000 MDB file for the back end.

But it wasn't used just for data storage.

The reports were all done in Access and there are also tons of
stored parameterized QueryDefs, and even several code modules.

The Delphi programmer in question made quite a bit of use of
*Access* in his application and not just Jet 4.

That said, he really didn't have a clue about database application
design or about how to use Access/VBA itself, and that's why his
application never worked, and that's why I was hired to recreate it
from scratch.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #3
jo*******@hotmail.com (John Fine) wrote in message news:<ff*************************@posting.google.c om>...
I wrote a Delphi application that accesses a local Access database
using 2 instances of the TADOQuery class. Unfortunately, when I
traverse the DB records using the first TADOQuery instance, the
pointer to the active record maintained by the second TADOQuery
instance is also affected. Is there a way I can force Delphi to use a
seperate pointer to the DB for each instance of my class?


Your question is very likely delphi specific.
Searching on google, looks like you'd have more luck on
borland.public.delphi.database.ado
You might want to search using google yourself and check your question
hasn't already been answered as there's quite a few threads I found
searching on "TADOQuery".

Good luck.
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by bluedolphin | last post: by
1 post views Thread by Thomas René Sidor | last post: by
27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.