CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 3 of 3

Thread: [RESOLVED] runtime error 70 permission denied vb6

  1. #1
    Join Date
    Jan 2012

    [RESOLVED] runtime error 70 permission denied vb6

    my code is

    FileCopy GetAppPath() & "TCMS.mdb", "E:\TCMS Backup\TCMS Daily Backup\" & Format$(Now, "dd") & ".mdb"

    Public Function GetAppPath() As String
    GetAppPath = IIf(Right$(App.Path, 1) = "\", App.Path, App.Path & "\")
    End Function

    i intend to take backup of my database file in a different folder in a different drive
    but am getting an error "Runtime Error 70. Permission Denied

    any body please help

  2. #2
    Join Date
    Jul 2006

    Re: runtime error 70 permission denied vb6

    That can mean the file is currently opened by another application.
    Make sure your own app has closed all open recordsets and that no other app has its fingers in the tables.
    Close the connection if you had it open.
    Also your current user must have the rights to copy the file.

  3. #3
    Join Date
    Jan 2006
    Fox Lake, IL

    Re: runtime error 70 permission denied vb6

    Try running the backup BEFORE the program starts.

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)