Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 13th, 2007, 01:20 PM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default Locked Database help??

Hi.
I have posted earlier about this. I am creating a user registration page for my site. It worked great on my testing server, then conked out when it got on my real server.
I made a few adjustments. It may be working now, but I know the database it is trying to access is "locked". I know this because I receive the following error message:
ADODB.Recordset error '800a0cb3'

Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.

/thanks2222.asp, line 24

I realize it seems to tell me the database may be locked.
I have found articles about this issue, and have read forums here of people with similar problems, but nothing is working. I keep getting the same error.
Does anyone have any thoughts?
If you need, I can post the code.
Thanks in advance.

Invisible Bunny King

Now is the only thing that's real.
__________________
Now is the only thing that\'s real.
 
Old February 13th, 2007, 01:45 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You need to make sure the file and directory have read/write permissions. Your provider will probably have to work with you. They might have a directory set up for this.


Woody Z
http://www.learntoprogramnow.com
 
Old February 13th, 2007, 01:47 PM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Woodyz:
Thanks for getting back to me.
I know what you are talking about. I use easycgi for my hosting. I go to their online ftp. There, I can see my database and set permissions. I have it set to RW (read/write) but I still get the error.
No offense to them, but their customer service sucks. I have asked them about this and have gotten nowhere.
Any other thoughts?

Now is the only thing that's real.
 
Old February 13th, 2007, 02:23 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

How are you locking the recordset, adLockOptimistic?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
 
Old February 13th, 2007, 02:52 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

IIS needs read write on the directory

Woody Z
http://www.learntoprogramnow.com
 
Old February 13th, 2007, 03:09 PM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

dparsons,

Why yes, I am using adLockOptimistic. In one of the tutorials I read, this was the recommended option. The other types don't seems to make sense to use. Here is the code involving this issue:

Dim objConn
Dim dbPath
Dim strSQL
Dim tableName
Dim rscustomers
dbPath="/db/Hockeycards.mdb"
sConnection = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=/db/HockeyCards.mdb"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.mode =3 '3="adModeReadWrite
Set rscustomers = Server.CreateObject("ADODB.Recordset")
tableName="CustomerList"
strSQL="SELECT * FROM CustomerList"
rscustomers.Open strSQL, sConnection
CursorType="adOpenKeyset"
LockType="adLockOptimistic"
CursorLocation="adUseServer"

Any thoughts would be great. To me, it should be working. Thanks

Now is the only thing that's real.
 
Old February 13th, 2007, 04:55 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

There is a chance I am wrong, but 99.9 percent of the time, this is a folder permissions issue, not a code issue.
Now, the code you show is reading only. I assume you are able to read, you just can't update.

The simplest test for updating will be to write a simple insert or update sql statement.
If you get an access error you will know that it is not a property of the recordset, but rather a permissions issue.
If it works, then you will need to investigate the recordset properties.

Rule number one: Isolate the problem before trying to fix it.

Woody Z
http://www.learntoprogramnow.com
 
Old February 13th, 2007, 05:44 PM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

woodyz,
Hi. Thanks for replying. You're right: this code is reading. I have more code that is a .AddNew statement. In fact, this is where I am receiving the error. The line that says rscustomers.AddNew.
I have tried turning it into an INSERT INTO statement, but I can't even get past the first line. It expects a statement end after the word INTO. I don't know why this is. My syntax seems to be good.
Anyway, I guess I'm saying I've tried what you suggest but receive the same error.
So, in your opinion this means that it would be folder permissions. There is a folder called db on my server. This is where the database is. The database itself is set to read/write. Should the folder db be set to this as well?
Oh well, I'll try it and see what happens...

Now is the only thing that's real.
 
Old February 13th, 2007, 05:52 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Maybe this helps??

http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=263

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: Flower by Sonic Youth (Track 10 from the album: Bad Moon Rising) What's This?
 
Old February 13th, 2007, 08:56 PM
Authorized User
 
Join Date: Feb 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar:
Thanks, that is a very helpful article. The problem though is that my problem is having it work on my "real" web server, not my local server. The article you gave is for C: databases, mine is on a server far away.
I understand the point of the article: permissions.
What I can say is that on my web server, there is a folder called db. This is where databases are stored. I have set read and write access to this folder. In the folder is my database called HockeyCards.mdb. I have also set permissions to read and write access.
Unfortunately, I still receive the error I talk about.

Again, I would just like to say that I had everything working locally, when everything was C: based. It was when I put everything on the server that things messed up. Unfortunately, my web server customer support is not very helpful, that's why I'm here.

Invisible Bunny King

Now is the only thing that's real.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Locked files Raymondg Other Programming Languages 0 May 18th, 2007 03:46 PM
Locked Database Brendan Bartley Access 3 January 3rd, 2007 05:40 PM
Access 2000 database file locked up jeffcflam Access VBA 1 October 19th, 2006 10:38 AM
Locked Cells dkr72 Excel VBA 1 December 13th, 2004 05:04 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.