|
-
Nov 6th, 2006, 02:08 PM
#1
Thread Starter
Junior Member
Renaming an Access file
We have a program that is not ours that is writing to a file called "Connect:. We would like to use this file in a VB Application but keep getting an error because "Connetc" is a keyword. Is there anyway to use this file by renaming it in the VB app. we cannot change the file name because the other program is looking for that file to write the data to and we cannot change that.
Thanks in advance for your help.
-
Nov 6th, 2006, 02:12 PM
#2
Re: Renaming an Access file
VB Code:
Private Sub Command1_Click()
FileCopy "c:\ConnectC.mdb", "C:\newfolder\newfilename.mdb"
End Sub
-
Nov 6th, 2006, 02:14 PM
#3
Re: Renaming an Access file
That changes it for the other program too Hack. (edit: oops, no it doesn't - but it does mean that you aren't working with the same file anymore!)
There is no way of renaming the file without renaming it for all programs... but what it is called should not be an issue for your program.
What code/connection method are you currently using?
-
Nov 6th, 2006, 02:49 PM
#4
Re: Renaming an Access file
He would be working with the exact same file up until the time it was copied. Anything done to the orignial file after the copy would not be carried over to the new file unless the new file was deleted, and then recopied.
But, that should be pretty self-evident.
-
Nov 6th, 2006, 02:55 PM
#5
Re: Renaming an Access file
Agreed.. it just seems to me that the problem is that there is a coding error which is stopping the file from being opened at all. I also think that there is a need to open the same file that the other app is writing to.
We'll have to wait for a reply before we know if that is the case tho!
-
Nov 6th, 2006, 03:00 PM
#6
Re: Renaming an Access file
 Originally Posted by si_the_geek
We'll have to wait for a reply before we know if that is the case tho!
Yep, agreed.
My impression from the original question was that he wanted to use a database in a VB app he is building that is a part of a canned (probably purchased) application. His application being different from the original.
I've done similar things in the past where my customers wanted reports that the original software package wasn't able to produce, so I sort of "borrowed" the database for my own purposes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|