Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

rs.save SP2 Acccess Denied

Hi,

I use the ado and rs.Save strParamFile, adPersistXML command to
save data in the local network.

It used to work fine until both (file server and client) became XP SP2.
Now I get an 'Access Denied' error (in a dag??.tmp file i think)

What is confusing me is that is still working fine when one of the PCs is
either with Win98 or with earlier version XP (or the server with earlier XP
version and the client with XP SP2).

What do i have to change in XPs security or in the code?

Thanks in advance
[571 byte] By [stalad] at [2007-11-11 7:38:13]
# 1 Re: rs.save SP2 Acccess Denied
Does the user have required permissions to the folder (network resource?) where the file is being saved?
pclement at 2007-11-11 17:26:44 >
# 2 Re: rs.save SP2 Acccess Denied
Thanks for the interest
I checked this by giving file path in two standalone computers
with XP Pro SP2, something like
strParamFile="\\mycomputer\c\appdir\Filename.xml"
and i get the same error messsage at the ONE? of them.

i have full access previliges as administrator.

The module is small (the file has been previously fine created and i
now i try to update the field UseAlgo):

Dim adoRs_AlgoParam As New ADODB.Recordset
Dim strParamFile As String
strParamFile = "\\myCompyter\c\sourcedir\" & ALGO_PARAM_FILE

adoRs_AlgoParam.Open strParamFile, , adOpenStatic, & _
adLockBatchOptimistic, adCmdFile
adoRs_AlgoParam!UseAlgo = False
adoRs_AlgoParam.UpdateBatch
adoRs_AlgoParam.Save strParamFile, adPersistXML
stalad at 2007-11-11 17:27:46 >
# 3 Re: rs.save SP2 Acccess Denied
If the error message occurs on the Save method there's only two possibilities. The first is that the permissions on the folder (or file) are insufficient and two, the file you're saving to exists and is currently open.

You might want to try using the Filemon and ProcessExplorer utilities to see if you can identify the problem.

http://www.sysinternals.com/Utilities/ProcessExplorer.html
http://www.sysinternals.com/Utilities/Filemon.html
pclement at 2007-11-11 17:28:44 >
# 4 Re: rs.save SP2 Acccess Denied
Hi Paul,
nice to see your message.
Lets see what we have and if they make any sense.
The 'File Monitor' tell us that the 'Access Denied' error propably occurs when
the EXE, with the process #??, tries to open the file 'Dag??.tmp' at 5:30:43:870.
The file has been already closed with success at 5:30:43:870 from the same process. The same process already had several successful (open,read,write,etc) requests to the same file which excludes the possibility that there are insufficient privileges - in the same directory app.path is also the mdb. The time of the open request can be the same to that with the close request (.. but how can i bypass this? I also used the monitor only for the execution of the .save command-with the debugger).
Notice that the access denied error does not occurs at the .xml file but from a .tmp.
Process Explorer seems that it can not help me 'cause the error occurs in a flash.

Any comments would be appreciated.

Once more, thank you for the interest
stalad at 2007-11-11 17:29:49 >
# 5 Re: rs.save SP2 Acccess Denied
Do you know what 'Dag??.tmp' is? Is a path to this file specified?
pclement at 2007-11-11 17:30:45 >
# 6 Re: rs.save SP2 Acccess Denied
During the program execution, vb creates some dag??.tmp files like dag8.tmp, dag24.tmp, dag2C.tmp, etc. The two letters vary from one execution to the other.
The one that creates the access denied error has the same content as the .xml.
Maybe that means that the .save command or the rs.open uses a .tmp file that later cannot delete or read. Thats all i understand but i don't know how to fix it or to bypass it.

I decided to use the xml files to store some new parameters rather to add new fields in the database. The application used to work in several different stores without problem until some of them added PCs with XP Home in their local network.
stalad at 2007-11-11 17:31:44 >