Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Access Denied - Urgent

Status
Not open for further replies.

dmh4ab

Programmer
Oct 2, 2002
53
US
Suddenly something that has worked for months, is giving me an error and driving me crazy.

Upon opening the application, it checks to see if there is a later version of the executable on the network, and replaces the version on the users hard drive with the version of the network.
This worked perfect on my machine just a couple of hours ago, and now it is giving other users the error "Run-time error '-2147467259 (80004005)' [DBNMPTNTW] Access denied".

Here is the code when the application is opened:

Code:
On Error GoTo Local_Err

If Update = False Then
If FileDateTime("S:\GROUP\ENG\eRoutings\RepairProject.exe") > FileDateTime("C:\Program Files\RepairProject\RepairProject.exe") Then
Shell "S:\GROUP\ENG\eRoutings\Update\Update.exe", vbNormalFocus
Update = True
End
End If
End If

Local_Err:
If Err.Number Then MsgBox Err.Description, vbOKOnly, "Update Error!"


And the shelled program does this:

Code:
If App.PrevInstance = True Then
MsgBox "Application is already running ! "
End
End If

Dim Delay&, FileCheck
frmUpdateDuckII.Show: DoEvents
Delay = Timer
While Timer < Delay + 2
Text1 = &quot;Duck II is updating....Please Wait !!!&quot; & vbCrLf _
& Format(5 - (Timer - Delay), &quot;#&quot;) & &quot; Secs.&quot;
DoEvents
Text1.SelStart = Len(Text1)
Wend
'copy file to users pc
FileCopy &quot;S:\GROUP\ENG\eRoutings\RepairProject.exe&quot;, &quot;C:\Program Files\RepairProject\RepairProject.exe&quot;
While Timer < Delay + 5
Text1 = &quot;Duck II is updating....Please Wait !!!&quot; & vbCrLf _
& Format(5 - (Timer - Delay), &quot;#&quot;) & &quot; Secs.&quot;
DoEvents
Text1.SelStart = Len(Text1)
Wend
Shell &quot;C:\Program Files\RepairProject\RepairProject.exe&quot;, vbNormalFocus
End


Any help would be greatly appreciated before I pull my hair out!
 
i can only speculate because this is a wide ranging error message (or so it would seem on google!)

i searched google for &quot;visual basic [DBNMPNTW] Access denied&quot;

and came up with many hits!

there seems to be a few people who have suddenenly recieved this message and it seems to be in reference with one of two things... using sql server 2000 or ASP


unfortunately i cannot help further!

good luck!

If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
come on... get involved!
To get the best response to a question, please check out FAQ222-2244 first
A General Guide To Excel in VB FAQ222-3383
 
Thanks.
I will research these first thing in the morning when I get to work!
 
Problem solved!!!!
Turns out that a patch has been installed on the SQL Server over the weekend. This allowed access to the server only if the user had the SQL Client installed on the local machine, no longer just sufficient to connect through the code.

Thanks all,
dmh4ab
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top