Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / February 2008



Tip: Looking for answers? Try searching our database.

ActiveConnection works at one host but not at another

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bhssc - 12 Feb 2008 08:39 GMT
This concerns opening more than one ActiveConnection simultaneously with
ADODB objects (Recordset, Command) to update data in an MS Access 2002
database. If you go to http://fast-ad.us/ you'll see a message I put there in
my debug statements, to show the error. The techies at the host 1&1.com seem
to have no clue how to solve this basic problem of having more than one
'write' ActiveConnection open at a time. I've been trying with them for
weeks, but have failed. The identical site http://fast-ad.co.uk/ at
Fasthosts.co.uk works perfectly. What could be difference between the two
hosts which is causing this serious problem, please? The database permissions
are set to 'Update'; so, it cannot be that. Could it possibly be that the
British version of MS Access does not work properly on an American hosting
platform? I'd find that hard to believe.
Bob Barrows [MVP] - 12 Feb 2008 12:11 GMT
> This concerns opening more than one ActiveConnection simultaneously
> with ADODB objects (Recordset, Command) to update data in an MS
[quoted text clipped - 9 lines]
> British version of MS Access does not work properly on an American
> hosting platform? I'd find that hard to believe.

File system permissions is the problem. The folder containing the database
file requires Modify permissions for all users of the database file in order
to allow multi-user activity. In your case, I assume you are using anonymous
access so the user account used for anonymous access (usually
IUSR_MachineName) needs to be granted those permissions. Users need to be
able to create, modify AND DELETE the databasename.ldb file which is used to
control locks in the database file during multi-user activity.

I notice that instead of an explicit connection object, you are setting
activeconnection to a connection string. This is a very bad practice in that
it prevents ADO's session pooling from optimizing connection use.

Best practice is to instantiate and open a connection object:

dim cn
set cn = createobject("adodb.connection")
cn.open "your connection string"

And use Set to assign that object to activeconnection:

set rs.activeconnection = cn

This keeps you in control of the connection and allows you to close the
connection as soon as you are finished using it ... another Best Practice,
especially when using Access as the backend.

Signature

Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

bhssc - 12 Feb 2008 13:21 GMT
It's the first time I've used this method to get help, and I'm very impressed
with the speed and quality of the reply. Thank you, Bob! I'll pass this info
to 1&1 in the hope that they'll be able to use it to solve the problem. I'll
post the result here.

Thank you also for taking the time to comment on the other matter of the
Connection object. I did try this to solve the first problem, but it made no
difference, of course. I used a connection string because I'd read some forum
entries that, strangely, a string connects faster.

> > This concerns opening more than one ActiveConnection simultaneously
> > with ADODB objects (Recordset, Command) to update data in an MS
[quoted text clipped - 35 lines]
> connection as soon as you are finished using it ... another Best Practice,
> especially when using Access as the backend.
bhssc - 12 Feb 2008 13:45 GMT
Bob, I didn't even need to contact 1&1; you solved it for me with the single
word "folder"! I'd set the permissions for the .mdb file, without realising
that I could do that to the folder itself. Why on Earth didn't the 'techies'
at 1&1 realise that? Fast-Ad.us is working at long last, thanks to you. If
you were female, I'd kiss you!

> It's the first time I've used this method to get help, and I'm very impressed
> with the speed and quality of the reply. Thank you, Bob! I'll pass this info
[quoted text clipped - 45 lines]
> > connection as soon as you are finished using it ... another Best Practice,
> > especially when using Access as the backend.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.