Building a Dynamic Website
Author
Discussion

webmistress

Original Poster:

99 posts

287 months

Friday 12th November 2004
quotequote all
Have ground to a horrible halt & wld appreciate some advice please….

Am trying to learn how to set up a dynamic website using WinXP Pro, Dreamweaver MX and ASP Javascript. All goes fine until I connect to an MS Access database and attempt to add a record set under the bindings tab. From this point on the page won't preview on the testing server (IIS 5.1)– even before I add any data to the page from the database/recordset – I keep getting the same message:

“Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.”

I’ve hunted around and it looks like this is related to the Sharing & Security properties of the database. I’ve tried allsorts of different settings and locations for the file without success. Currently it’s in a folder on my desktop with the WebSharing properties set to ‘share this folder'.

Does anyone know how to get round this - or more likely, where I'm going wrong....?

Thanks!

PetrolTed

34,468 posts

330 months

Friday 12th November 2004
quotequote all
It's not web sharing that you need. You just need to ensure that the Internet Anonymous User has write access to the file.

i.e. make sure it's not read only, and then on the properties of the database, ensure that the IUSR_WWWW or whatever it's called (or 'everyone') has write access to the file.

anonymous-user

81 months

Friday 12th November 2004
quotequote all
It's IUSER_<Machine Name>

But it's not just the file that needs write access. This user needs write access to the folder as well to allow it to write the .ldb lock file.

webmistress

Original Poster:

99 posts

287 months

Friday 12th November 2004
quotequote all
Thanks for coming back so quickly, much appreciated!

Unfortunately I haven’t been able to locate/amend the IUSER properties/permission on this system, but might have made some kind of progress.

Since this morning, I’ve moved the database into the wwwroot folder of the Inetpub folder created when I installed IIS and changed the users (other than myself, system and Adminstrator) to Read, Read & Execute and Write. I’ve also done this to the .mdb file and .ldb file when it was visible (but seems to reset itself each time).

I’ve been able to add a Recordset to the Bindings succesfully but still don’t seem to be able to add a data source to my page (although I have managed a couple of times and then lost it again when I refreshed or tried to add some more). The error message I get now is slightly different to the original one and seems to refer now to the Temp file which is created each time in http://localhost/ (being the URL of the testing server).


“Error Type: Provider (0x80004005) Unspecified error /TMP3kh2r72l05.asp, line 5

The code on line 5 is “rs1.ActiveConnection = MM_test_STRING;” rs1 being the recordset.”

Am at a point now where I ican make changes to the page, save it, close Dreamweaver MX and then open it again, I can successfully preview the page correctly once before getting an error message...




webmistress

Original Poster:

99 posts

287 months

Friday 12th November 2004
quotequote all
Quick update:

Have rebooted (again) and strangely all seems to be working properly now - huh! computers....

PetrolTed

34,468 posts

330 months

Friday 12th November 2004
quotequote all
A word of warning - do not leave the database in the root directory on your live system. It should be placed somewhere not accessible via HTTP.

The recordset issue you describe is often down to the mode in which the database/recordset has been opened.

I'm not a big fan of the recordset other than for grabbing data. There are more robust ways of writing data to the database.

judas

6,228 posts

286 months

Friday 12th November 2004
quotequote all
Another word of warning - this time a peculiar Dreamweaver quirk: sometimes (but not always) DW can lock the database file itself when you set up a recordset or whatever and it won't unlock until you quit Dreamweaver. Makes doing quick changes and previewing it interesting sometimes...

ErnestM

11,621 posts

294 months

Friday 12th November 2004
quotequote all
PetrolTed said:
There are more robust ways of writing data to the database.



There are also more robust databases to use for dynamic web content...


ErnestM

>> Edited by ErnestM on Friday 12th November 16:55

webmistress

Original Poster:

99 posts

287 months

Friday 12th November 2004
quotequote all
Thanks for all the advice, much appreciated!

Will have to start look into 'more robust ways'....

LaurenceFrost

691 posts

279 months

Friday 12th November 2004
quotequote all
If this happens again just delete the <dbname>.idb file in the same directory.

This should release the lock on the database.

BTW look at MySQL. It's free and bloody superb.

judas

6,228 posts

286 months

Saturday 13th November 2004
quotequote all
LaurenceFrost said:
BTW look at MySQL. It's free and bloody superb.

Definitely! Especially now version 4.1 has been released! Subqueries at last! My life is complete