
March 8th, 2005, 03:16 AM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 2
Time spent in forums: 11 m 51 sec
Reputation Power: 0
|
|
|
Localhoast ignoring "write" permissions
I hope I can get some help on this. I am running windows xp pro with with 2003 MS VS. I opened VS and created a new project called "permission". It was created in the inetpub subdirectory of www on the C drive. I added a directory called "database" and put an MS Access database in that folder. Next, I opened my MMC and went to the properties for the web called permission. I set the properties to read/write. I also checked the database file and it was read/write. When I created a page with the following code:
Code:
<!-- #include file="adovbs.inc" -->
<%
Set cnn1 = Server.CreateObject("ADODB.Connection")
openStr = "driver={Microsoft Access Driver (*.mdb)};" & _
"dbq=" & Server.MapPath("database/test.mdb")
cnn1.Open openStr,"",""
sql = "SELECT * FROM test"
Set test = Server.CreateObject("ADODB.Recordset")
test.Open sql, cnn1, adOpenForwardOnly, adLockReadOnly, adCmdText
Response.Write "Connected"
test.AddNew
test("name") = "tom"
test.Update
%>
When I open the page in IE, I get this message:
Code:
Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
/permissions/test.asp, line 13
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Page:
GET /permissions/test.asp
As a side note, IF I duplicate this process BUT have the files in the MyDocuments folder's sub-directory called MyWebs, the database can be written to all day long providing I set the permissions in the MMC as prev. described. I believe that what is going on is I can not write to the C drive. I had this issue on my last laptop but do not recall how I solved it. WHen I open up windows Explorer and right click on the main inetpub directory and chose properties, it is set to "read only". When I unclick "read only", it seems to proceed as if it is working but when complete, it still reads "read only". Can someone shed some light on this for me?
|