CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2012
    Posts
    3

    [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
    Location
    Germany
    Posts
    3,725

    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
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: runtime error 70 permission denied vb6

    Try running the backup BEFORE the program starts.
    David

    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
  •  





Click Here to Expand Forum to Full Width

Featured