Jet connections

M

MikeR

Is it possible have 2 connections to a Jet DB at the same time?
Using either ADO or DAO in my Delphi app, I get a 'File in use' message.
Thanks, Mike
 
D

Dirk Goldgar

MikeR said:
Is it possible have 2 connections to a Jet DB at the same time?

Yes, certainly.
Using either ADO or DAO in my Delphi app, I get a 'File in use' message.

Are you opening the database exclusively? What does your code look like?
 
A

Albert D. Kallal

MikeR said:
Is it possible have 2 connections to a Jet DB at the same time?
Using either ADO or DAO in my Delphi app, I get a 'File in use' message.
Thanks, Mike

About the only thing I can think of is that the mdb file is in a directory
where users do not have file creating and deleting rights.

If access cannot open a "temp" working file in that same dir as the mdb
file, then the file is opened in exclusive, or perhaps read only mode.

Here is a standard windows script:

Set dbeng = CreateObject("DAO.DBEngine.36")
strMdbFile = "C:\Documents and Settings\Albert\My
Documents\Access\multiselect\MultiSelect.mdb"
Set db = dbeng.OpenDatabase(strMdbFile)
set rstContacts = db.OpenrecordSet("contacts")
rstContacts.MoveLast
msgbox "there is " & rstContacts.RecordCount & " records in the table
contacts"
rstContacts.Close
db.Close

The above can be pasted into a notepad, and then re-name the file extension
as .vbs
(you have to have file extensions turned on).

when you rename as ".vbs", you just created a windows script

Try then double clicking on this script. The code will halt at the msgbox
with the file open.

You can then try to launch another copy of the above script....

I would first test with a mdb file in know location such as:

c:\mytest\test.mdb

If you can run both scripts at the same time, then you able to have
process/programs open the
file at the same time.

If you cannot, then perhaps you are opening the file as exclusive?

note that the above script should run on any windows box 2000 and later even
with ms-access NOT having been installed since jet + dao comes with
windows.....

I would first check file permissions rights, and then check if somehow your
code is opening the file in excusive mode....
 
A

aaron.kempf

Jet sucks, there is not a single reason in the world to use it.

Jet wasn't designed -- from the ground up-- to work with multiple
users.
Those are Microsofts _EXACT_ words.

Move to SQL Server or mySQL, if you're a poor college student or
something.
SQL Server is free enough for me, and my apps currently support
100,000 clients..

SQL 2005 Express is just enough of a database for me-- I don't need
anything else.
and it sure doesn't give me 'file in use' errors

-Aaron
 
M

MikeR

JEEZ, I wish they'd take you back on whatever world you were kicked
off of.

Jet sucks, there is not a single reason in the world to use it.

Jet wasn't designed -- from the ground up-- to work with multiple
users.
Those are Microsofts _EXACT_ words.

Move to SQL Server or mySQL, if you're a poor college student or
something.
SQL Server is free enough for me, and my apps currently support
100,000 clients..

SQL 2005 Express is just enough of a database for me-- I don't need
anything else.
and it sure doesn't give me 'file in use' errors

-Aaron
 
M

MikeR

Dirk said:
Yes, certainly.


Are you opening the database exclusively? What does your code look like?
Thanks Dirk -
Nailed in one.

dbE := CreateOleObject('DAO.DBEngine.36');
DBDao := dbE.OpenDatabase(DBFName, True, False, ';pwd=' + '');
 
M

MikeR

Albert said:
About the only thing I can think of is that the mdb file is in a directory
where users do not have file creating and deleting rights.

If access cannot open a "temp" working file in that same dir as the mdb
file, then the file is opened in exclusive, or perhaps read only mode.

Here is a standard windows script:

Set dbeng = CreateObject("DAO.DBEngine.36")
strMdbFile = "C:\Documents and Settings\Albert\My
Documents\Access\multiselect\MultiSelect.mdb"
Set db = dbeng.OpenDatabase(strMdbFile)
set rstContacts = db.OpenrecordSet("contacts")
rstContacts.MoveLast
msgbox "there is " & rstContacts.RecordCount & " records in the table
contacts"
rstContacts.Close
db.Close

The above can be pasted into a notepad, and then re-name the file extension
as .vbs
(you have to have file extensions turned on).

when you rename as ".vbs", you just created a windows script

Try then double clicking on this script. The code will halt at the msgbox
with the file open.

You can then try to launch another copy of the above script....

I would first test with a mdb file in know location such as:

c:\mytest\test.mdb

If you can run both scripts at the same time, then you able to have
process/programs open the
file at the same time.

If you cannot, then perhaps you are opening the file as exclusive?

note that the above script should run on any windows box 2000 and later even
with ms-access NOT having been installed since jet + dao comes with
windows.....

I would first check file permissions rights, and then check if somehow your
code is opening the file in excusive mode....
Thanks Albert -
As is so often the case, pilot error. I was opening in exclusive mode.
 
T

Tony Toews [MVP]

Jet sucks, there is not a single reason in the world to use it.

Jet wasn't designed -- from the ground up-- to work with multiple
users.
Those are Microsofts _EXACT_ words.

Completely wrong.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
D

David W. Fenton

If access cannot open a "temp" working file in that same dir as
the mdb file, then the file is opened in exclusive, or perhaps
read only mode.

Er, it's not any "temp" file that is involved -- all of Jet's temp
data files are stored in the %temp% folder, not in the same folder
as the MDB. It's the LDB that is the problem -- if the user can't
lacks permissions to create a file, there can be no LDB file
created, and that means that the database can only be opened
exclusively, as the LDB file is required for sharing.
 
D

David W. Fenton

[quoting Aaron:]
Provide the quote and the context.

Aaron never responds to even one request for documentation for his
crazy claims. Of course, he *can't* provide a citation for this one,
as he's just made it up entirely.
 
B

BruceM

Every now and again he has dredged up an article from six years ago or
something, but my point was to show those unfamiliar with him that his
"facts" tend to lack basis.


David W. Fenton said:
[quoting Aaron:]
Provide the quote and the context.

Aaron never responds to even one request for documentation for his
crazy claims. Of course, he *can't* provide a citation for this one,
as he's just made it up entirely.
 
A

aaron.kempf

David;

I don't need to prove anything.. Microsoft claims that JET was -NEVER-
DESIGNED-TO-SUPPORT-MULTIPLE-USERS-

They've stated this in multiple places.

I don't care about what they say -today- I care about the original
documentation from MS, circa 1995.. that claims in plain english that
Jet is not designed for multiple users.











[quoting Aaron:]
Provide the quote and the context.

Aaron never responds to even one request for documentation for his
crazy claims. Of course, he *can't* provide a citation for this one,
as he's just made it up entirely.
 
A

aaron.kempf

Facts?
You don't know the least thing about the facts, kid!

u're the dipshit that claims that I'm wrong.. just because everyone
else around here is infected with Jet bullshit.

**** you dude.

Facts say that SQL Server wins.. Please point to me a single entry for
Jet databases at www.tpc.org and until then, stfu script-kiddie

Just because Jet corrupts-- is why it sucks dick and anyone using it
should be fired and then spit upon

-Aaron


Every now and again he has dredged up an article from six years ago or
something, but my point was to show those unfamiliar with him that his
"facts" tend to lack basis.

David W. Fenton said:
[quoting Aaron:]
Jet wasn't designed -- from the ground up-- to work with multiple
users.
Those are Microsofts _EXACT_ words.
Provide the quote and the context.
Aaron never responds to even one request for documentation for his
crazy claims. Of course, he *can't* provide a citation for this one,
as he's just made it up entirely.
 
A

aaron.kempf

wow, that sure doesn't sound very efficient to me.. with SQL Server
you can put tempdb files wherver you want.. and they run better.. and
they clean up after themselves

meanwhile, you guys like 4 tiers of Jet for small apps.
(frontend, backend, auto-fe-updater and tempdb)

what a ****ing con

-Aaron
 
A

aaron.kempf

Tony;

no-- those are Microsoft's exact words.

So sorry that you've worked on _ONE_ database upsizing project-- and
it was 'too complex' for you..
so sorry that you think that means that EVERYONE should use Jet for
EVERYTHING and that you should disregard where Microsoft specificially
states that Jet ****ing sucks a big fat dick

-Aaron
 
V

vanzandt

Of course Access isn't listed on that site. That site only lists databases
that handle 100 GB or more of data. Access is a desktop database handling
up to 2 GB of data in each Jet or ACE file.

http://www.tpc.org/tpch/results/tpch_perf_results.asp

What's funny is you failed to realize SQL Server didn't make the top 10
_EITHER_.

http://www.tpc.org/tpcc/results/tpcc_perf_results.asp

So, Aaron, when are you moving to Oracle 10g or IBM DB2 9.x?



Facts say that SQL Server wins.. Please point to me a single entry for
Jet databases at www.tpc.org and until then, stfu script-kiddie

-Aaron


Every now and again he has dredged up an article from six years ago or
something, but my point was to show those unfamiliar with him that his
"facts" tend to lack basis.

[quoting Aaron:]
Jet wasn't designed -- from the ground up-- to work with multiple
users.
Those are Microsofts _EXACT_ words.
Provide the quote and the context.
Aaron never responds to even one request for documentation for his
crazy claims. Of course, he *can't* provide a citation for this one,
as he's just made it up entirely.
 
B

BruceM

If you are expressing a personal preference in the absence of documentation
that is one thing, but if you are going to "quote" somebody you can
reasonably be expected to provide the quote and the context. Of course,
considering who I am addressing "reasonable" does not apply.

The absurdity of alluding to documentation from fourteen or more years ago
to make a case against a current product speaks for itself, expecially since
you won't cite specific documentation in any case.

David;

I don't need to prove anything.. Microsoft claims that JET was -NEVER-
DESIGNED-TO-SUPPORT-MULTIPLE-USERS-

They've stated this in multiple places.

I don't care about what they say -today- I care about the original
documentation from MS, circa 1995.. that claims in plain english that
Jet is not designed for multiple users.











in
[quoting Aaron:]
Provide the quote and the context.

Aaron never responds to even one request for documentation for his
crazy claims. Of course, he *can't* provide a citation for this one,
as he's just made it up entirely.
 
D

David W. Fenton

m:
I don't need to prove anything.. Microsoft claims that JET was
-NEVER- DESIGNED-TO-SUPPORT-MULTIPLE-USERS-

Where does MS claim that?
They've stated this in multiple places.

Give us *one*.
I don't care about what they say -today- I care about the original
documentation from MS, circa 1995.. that claims in plain english
that Jet is not designed for multiple users.

Provide that documentation in a form that can be confirmed by others
to not just be invented by your fertile (and damaged) imagination.

You can't do that, because THERE IS NO SUCH DOCUMENTATION.

If there is, you will provide it.

But you will not do that, as you never ever provide any actual
documentation for any of your wildly stupid claims about Access and
Jet.

You are a liar, Aaron, and you have a history of lying. This is no
different than anything we've all seen a thousand times -- you make
a wildly unbelievable claim and then never bother to back it up with
any documentation.

This time will be no different than before, I have no doubt.
 
J

James A. Fortune

David said:
m:




Where does MS claim that?




Give us *one*.




Provide that documentation in a form that can be confirmed by others
to not just be invented by your fertile (and damaged) imagination.

You can't do that, because THERE IS NO SUCH DOCUMENTATION.

If there is, you will provide it.

But you will not do that, as you never ever provide any actual
documentation for any of your wildly stupid claims about Access and
Jet.

You are a liar, Aaron, and you have a history of lying. This is no
different than anything we've all seen a thousand times -- you make
a wildly unbelievable claim and then never bother to back it up with
any documentation.

This time will be no different than before, I have no doubt.

aaron uses older links quite differently than I do :). The link that
aaron gave for his claim was (link info updated July 2006):

http://msdn.microsoft.com/en-us/library/aa730870(VS.80).aspx

This was posted, among other places, in:

http://groups.google.com/group/microsoft.public.access/msg/466c4294f2182d50

aaron totally misunderstood what he was quoting. Viz.:

"it's highly unlikely that an application that was designed for a single
user will work reliably with concurrent users."

wasn't talking about Access in general. It was talking about an mdb
file that wasn't designed with concurrency in mind as part of the design
specification. Here's the entire paragraph (meant to push SQL Server
Compact Edition):

"Access, however, is not perfect. Performance degrades significantly as
the database size increases. The database is also prone to corruption.
Finally, starting with an Access database has tempted many developers to
do a dangerous thing. Sometimes a single-user application becomes
popular enough that there's a desire for it to be used by multiple
simultaneous users. The temptation is to just move the Access database
file to a network share, copy the application to multiple machines, and
let many users connect simultaneously. Access performance drops off
quickly with multiple users, and it's highly unlikely that an
application that was designed for a single user will work reliably with
concurrent users."

It doesn't say or imply anywhere that Access wasn't designed for
multiple users. I hope that clears up the misunderstanding.

James A. Fortune
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top