Re: ActiveConnection works at one host but not at another

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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!

"bhssc" wrote:

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.

"Bob Barrows [MVP]" wrote:

bhssc wrote:
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.

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.

--
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"



.



Relevant Pages

  • RE: Jet database access problem from web service
    ... "Sonya" wrote: ... > I have trouble connecting to Access database from my web service. ... > normal user who has full permissions over Data directory; ... > I also tried an Odbc connection with with the follwoing string: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: (Newbie)Application Roles
    ... level: the database itself. ... SQL Server accommodates these needs through the use of application ... the user's connection through a specific application. ... the connection permanently loses all permissions applied to ...
    (microsoft.public.sqlserver.security)
  • Re: Connection problem with Access
    ... If you don't need the Word object to connect, remove the relevant code as it's probably a distraction. ... However, I'm not sure you can manually connect Word to an Access data source that has a securit database, unless the Admin username and a blank password will give you access to the table you need. ... I think you'd probably have to do it the way I suggested, at lleast for an OLE DB connection. ... permissions can be relatively fine-grained, ...
    (microsoft.public.word.mailmerge.fields)
  • Jet database access problem from web service
    ... I have trouble connecting to Access database from my web service. ... permissions into the directory where database is located; ... I also tried an Odbc connection with with the follwoing string: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Dont understand my permissions to my SQL Server DB
    ... Have you checked the Logon account permissions for each user? ... Open that procedure in the .adp. ... UID in the connection string have the same name as the name returned by ... > I have an offsite SQL Server database. ...
    (microsoft.public.access.adp.sqlserver)