By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,453 Members | 956 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,453 IT Pros & Developers. It's quick & easy. not found exception

P: 19
During file copy, I'm giving the absolute file name. But the compiler says file not found always. Is it a problem in my system or any error in my program.
Expand|Select|Wrap|Line Numbers
  2.  Public Sub backupDB()
  3.         Try
  5.             Dim FileToCopy As String
  6.             Dim NewCopy As String
  8.             FileToCopy = "E:\Gyana_projects\Medicine_Stores_Management.accdb"
  9.             NewCopy = String.Format("D:\BackUps\{0:yyyyMMdd}.mdb", Date.Today)
  11.             FileCopy(FileToCopy, NewCopy)
  12.      MsgBox("Backup Successful")
  13.         Catch ex As Exception
  14.             MessageBox.Show(ex.ToString)
  15.         End Try
  16.     End Sub
Also I'm Giving the absolute path of the file by Copying it from the address bar
File name is: Medicine_Stores_Management.accdb
Plz help ASAP.
Thanks in advance
Jan 14 '11 #1
Share this Question
Share on Google+
5 Replies

P: 24
Have you tried giving same file extension, because your src file is .accdb and destination is .mdb
Jan 14 '11 #2

P: 19
Yes, I have tried those. The only soln I'v Got, that the code is almost perfect.The problem might be in the system. The Access That I'v used is of unregistered version. While openining, It always asks to register. This might be the cause of all problem. I'v modified the code to copy other files, such as .vb or .txt. It works fine. Thanks for your prompt reply MR. Prasad599. Plz reply me on these thoughts.
Jan 15 '11 #3

P: 24
Is your OS version higher than win XP ?
Jan 15 '11 #4

P: 19
No. I'm running on Win xp Sp3.
Jan 15 '11 #5

P: 19
Hello Prasd599, I'v finally made it. Actually the code was perfect. The problem was with the unregistered version of MS Access. I'v fixed it and all is well. Thanks a lot Showing interest in my problem. Tk Kr.
Jan 18 '11 #6

Post your reply

Sign in to post your reply or Sign up for a free account.