Phil,
Well I'M BACK!!!!! Actually, I finally got the permission thing checked at the company serving the site. I
just got off the phone with them and they verify that on the NT server, the "data" folder is set for READ/WRITE
and all 10 files in the folder are currently set for READ/WRITE. They verified the IUSER information is all set
appropriately.
Here is what I am getting when I try to delete from the file:
=========================
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Visual FoxPro Driver]Cannot update the cursor.
/new/userdel.asp, line 18
=========================
Here is the code:
=========================
@LANGUAGE="VBSCRIPT"
#include file="adovbs.inc"
if request("p_del").count > 0 then
dim DBmiym
dim DBpath
set DBmiym=server.createobject("adodb.connection")
DBpath="sourceDB=" & server.mappath("../data")
DBmiym.Open "DRIVER={Microsoft Visual FoxPro Driver}; SourceType=DBF; " & DBpath & "; Exclusive=No"
set userSet=server.createobject("ADODB.RecordSet")
userSet.Open "select * from user",DBmiym,1,3,adCmdText
for each p_del in request("p_del")
userset.find "userid='" & trim(p_del) & "'"
userset.delete
next
UserSet.close
set userset=Nothing
DBmiym.close
set DBmiym=Nothing
end if
response.redirect "./userlist.asp"
=================================
I can open, search, and display information from the files without a problem. If I try to delete, as above,
I get the error. I checked to make sure I was finding the right record by removing the delete clause and
response.write the info out. That is correct.
On other pages that access the DB, if I try to UPDATE (like making a correction) or ADDNEW (such as
adding a new record) or using an SQL insert all get the same error.
HELP!!!! What am I missing? If this is a permission problem - what do I need to tell them at the hosting
company because it appears it is correct
Thanks
Pete
>Hi Peter,
>
>Some coments mixed in with your response:
>
>>Well, I checked that or at least tried to.... this is a Windows NT server that I don't have full access to but
>>under that assumption that it is NT, permissions shouldn't play a factor like UNIX does.
>
>
>NT permissions definately do play a role when it is ASP running in IIS accessing files on the web server. The ISUR account on the NT server running IIS has to have read\write permission on the data files. By default, this account does *not* have write permissions.
>
>
>>
>>Here is the current code....
>>
>> dim DBmiym
>> dim DBpath
>> set DBmiym=server.createobject("adodb.connection")
>> DBpath="sourceDB=" & server.mappath("../new")
>> DBmiym.Open "DRIVER={Microsoft Visual FoxPro Driver}; SourceType=DBF; " & DBpath & "; Exclusive=No"
>>
>> set userSet=server.createobject("ADODB.RecordSet")
>> userSet.Open "select * from user",DBmiym,1,3,adCmdText
>>
>> for each p_del in request("p_del")
>> userset.find "userid='" & trim(p_del) & "'"
>> userset.delete <<<<<<<<<--------------------------- This is line 20
>> userset.update
>> next
>>
>>
>>
>>Any suggestions?
>
>Does the table have any memo fields in it? While I think this error is permissions related, it could also have a SQL statement length issue. I recall the ODBC driver having problems with either memo fields, or when it generates a SQL statement (as it would for Update or Delete) being longer than 254 characters. Something like this.
>
>I don't think, however, that it would respond with this error. I kid you not, it has to be a permissions issue. A solution is to have your NA verify the permissions on these files for the ISUR account. To be certain it is a permission thing, temporarily give "Everybody" a "Full Control" setting on the files. If this resolves the issue, it is unquestionalbly a permissions thing.
Peter Brama
West Pointe Enterprises
VFP is getting easier but STILL alot to learn!!