I have developed a software in VB6. I want to give a menu option for back up. ie. to copy the database files to a pendrive
I have given the below code

 Dim sourcefile,Destinationfile as string
  sourcefile = App.Path & "\HHA.mdb"
  Destinationfile = Textdrive.text & "\HHA.mdb"
  Filecopy sourcefile,Destinationfile

  When worked out the above code -Permission Denied - message is displayed.

  My source file="C:\My Documents\HHA\HHA.mdb"

  When I changed my source file to "K:\HHA\Support\HHA.mdb"  - the copying worked well.ie. From the C drive copying is not allowed
  Any body can help me? Any idea...
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.