.MDB file will not overrite or copy

Okran

New member
Local time
1:02 PM
Messages
30
I'm programming in Vb2008 and using an Access 2003 backend for the data.

So I have my access database in My Projects\... ect and I build it to the usual x86\debug folder. However, when I copy the files to a folder I have made in C:\Program Files\ProgramName which had older versions of the files the .MDB file will not update.

I've checked both database files at this point and they're fine all records are up-to-date, except the one where I've copied it to in C:\Program Files\ProgramName is still the old file. I've even SHIFT+deleted the .MDB file from the directory and copied the new one over and it still shows the old data and tables when I open it!!

Any ideas, I'm stumped and totally confused.
 
Last edited:

My Computer My Computer

Computer Manufacturer/Model Number
Custom
OS
Windows 7 x64 Home Premium
CPU
Intel Q6600 @ stock
Motherboard
ASUS P5N-E SLI (Bios 1301)
Memory
6GB DDR2 6400 Crucial Ballistix (4-4-4-12-2T)
Graphics Card(s)
Gigabyte GeForce 560 OC 1GB @ stock
Sound Card
Asus Xonar DG (headphones via FP and speakers via rear jack)
Monitor(s) Displays
Samsung SyncMaster 2032BW
Screen Resolution
1680x1050
Hard Drives
WDC 250gb SATA, Maxtor 120gb IDE
PSU
Antec Earthwatts 650W
Case
Enermax
Cooling
1x120mm, 3x80mm Fans
Keyboard
Dell SK 8125 Enhanced Multimedia Keyboard
Mouse
Sharkoon Fireglider
Internet Speed
8 mbps (supposedly)
Other Info
Microsoft GameVoice, Microsoft Sidewinder Joypad
Hi thanks for the reply, I'm not using any linked tables or ODBC links. All tables are in the access file.

First impression if I was reading this would be, ah it must be the user doing something silly lol, but seriously I'm simply trying to copy one file over to another location and it's saying it's copied ok, but it really hasn't.

Oh and I'm the only user and have full admin rights.
 

My Computer My Computer

Computer Manufacturer/Model Number
Custom
OS
Windows 7 x64 Home Premium
CPU
Intel Q6600 @ stock
Motherboard
ASUS P5N-E SLI (Bios 1301)
Memory
6GB DDR2 6400 Crucial Ballistix (4-4-4-12-2T)
Graphics Card(s)
Gigabyte GeForce 560 OC 1GB @ stock
Sound Card
Asus Xonar DG (headphones via FP and speakers via rear jack)
Monitor(s) Displays
Samsung SyncMaster 2032BW
Screen Resolution
1680x1050
Hard Drives
WDC 250gb SATA, Maxtor 120gb IDE
PSU
Antec Earthwatts 650W
Case
Enermax
Cooling
1x120mm, 3x80mm Fans
Keyboard
Dell SK 8125 Enhanced Multimedia Keyboard
Mouse
Sharkoon Fireglider
Internet Speed
8 mbps (supposedly)
Other Info
Microsoft GameVoice, Microsoft Sidewinder Joypad
Something in your front end is pointing to the desired backend file. If you're not using linked tables, then it's probably an ODBC data source. You need to change that (or whatever component in your code points to the back end and manages the connection) to point to the new file.
 

My Computer My Computer

Computer Manufacturer/Model Number
Custom workstation /// Lenovo X61t tablet notebook
OS
Windows 7 RTM x64
CPU
Core i7 980X @ 4.04GHz OC /// Core Duo L7500 @ 1.6GHz
Motherboard
Asus P6T6 WS Revolution ///
Memory
12GB G. Skill @ DDR-1600 OC /// 4GB
Graphics Card(s)
Saphire HD4870 Toxic 1GB /// Intel Mobile GMA X3100
Monitor(s) Displays
Dual Eizo 24" SX2461W /// 12"
Screen Resolution
1920x1200 /// 1400x1050
Hard Drives
Workstation:
5x 750GB Barracuda-11 on Areca ARC-1220;
4x 1.5TB Barracuda-11 on Intel ICH10R;
Volumes:
300GB RAID 0, 2.7TB RAID 10 on Intel;
100GB RAID 0, 1.4TB RAID 10 on Areca ///
Notebook: G.Skill Titan 256GB SSD
PSU
Tagan ITZ 1100
Case
GHS-1500 ///
Cooling
Thermalright IFX-14 + a slew of stealth fans ///
Keyboard
Logitech Edge ///
Mouse
Logitech Wireless Optical Trackball
Internet Speed
5Mbps down / 820Kbps up
Other Info
Main use: photography;
DVD Drive: L.G GGW-H20L Blu-Ray / DVD;
OC: QPI/DRAM @ 1.33v, CPU @ 1.293v, DRAM Bus @ 1.65v, CPU PLL @ 1.88v, CPU mult = 25x, BCLK = 160, DDR3-1604 @ 7-8-7-24
Can you copy other files successfully? If yes, it sounds like a coding issue in your VB.

Test: Open the "old" mdb from Access - not from your front-end. Link the "new" mdb tables. Compare by query or whatever means. Are the tables identical?

My version of Windows does not "it's saying it's copied ok". If you are copying by code, examine your code carefully for the target.
 
The problem is not about a coding issue, or linked tables or any fault of your own.

I'm guessing you're coding and running your app on Windows 7, right? If this is true (why would it not be, if you're on SevenForums?), then it's because you're putting your Access database file into a subfolder of "Program Files", which on Vista and Windows 7 is classified as a protected folder, with restricted access to usually Administrator and Trusted Installers. This is by design to help prevent unauthorised programs (malare and such) from making changes they shouldn't.

If your MDB file is in some user folder, such as Documents, or some other user-created folder, then you wouldn't have a problem.

It'll take a bit of getting used to, but you'll have to recode your applications to run from "Program Files", but to locate any and all data files into a user folder.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Virtual Machine
OS
Windows 7 Professional 32-bit SP1
CPU
AMD A4/A6
Motherboard
Intel Corporation 440BX Desktop Reference Platform
Memory
3.00GB EDO
Graphics Card(s)
VMware SVGA 3D
Sound Card
High Definition Audio Device
Monitor(s) Displays
Generic Non-PnP Monitor on VMware SVGA 3D
Screen Resolution
1440x900
Hard Drives
1 x 60GB VMware Virtual SATA Hard Drive ATA Device
Antivirus
Kaspersky Total Security
Thanks for the input people, I think some of you have misinterpreted what I wrote though. I'm not using any code to copy the .MDB file, I'm simply trying to right click copy and right click paste into the destination directory so it is nothing to do with any code. Sorry I should have stated that more clearly in the first place.

Thanks Dzomlija I'll see what happens if I try a different folder. I would have thought that if there was any problems in copying a file or files then Windows would at least tell you it can't do it and why not.

Also the old file is deleted, yet it is still bringing up the old file as though it is the new one, why is that? That must be something not working correctly in Windows surely?

Here's what I'm doing:

Open explorer, browse to project folder containing the .MDB file
Right click and copy it
Browse to the Program Files\ProgramName folder and paste
It says preparing to copy and asks copy and replace or copy and keep existing
I choose copy and replace
It says You'll need to provide Admin permission to copy to this folder
I choose Continue as I have access being the Admin user

The file properties are the same as the source, yet when I open the file it is not the one I just copied, it is the old mdb file. This file remains the same no matter if I delete it and copy the newer one over, it still opens as if it is still the old file. How is that even possible when the file has been deleted and therefore no longer on my system?!
 
Last edited:

My Computer My Computer

Computer Manufacturer/Model Number
Custom
OS
Windows 7 x64 Home Premium
CPU
Intel Q6600 @ stock
Motherboard
ASUS P5N-E SLI (Bios 1301)
Memory
6GB DDR2 6400 Crucial Ballistix (4-4-4-12-2T)
Graphics Card(s)
Gigabyte GeForce 560 OC 1GB @ stock
Sound Card
Asus Xonar DG (headphones via FP and speakers via rear jack)
Monitor(s) Displays
Samsung SyncMaster 2032BW
Screen Resolution
1680x1050
Hard Drives
WDC 250gb SATA, Maxtor 120gb IDE
PSU
Antec Earthwatts 650W
Case
Enermax
Cooling
1x120mm, 3x80mm Fans
Keyboard
Dell SK 8125 Enhanced Multimedia Keyboard
Mouse
Sharkoon Fireglider
Internet Speed
8 mbps (supposedly)
Other Info
Microsoft GameVoice, Microsoft Sidewinder Joypad
Please can someone HELP!

It's driving me mad and I'm getting very concerned that this new Windows file allocation management system is still buggy!!
 

My Computer My Computer

Computer Manufacturer/Model Number
Custom
OS
Windows 7 x64 Home Premium
CPU
Intel Q6600 @ stock
Motherboard
ASUS P5N-E SLI (Bios 1301)
Memory
6GB DDR2 6400 Crucial Ballistix (4-4-4-12-2T)
Graphics Card(s)
Gigabyte GeForce 560 OC 1GB @ stock
Sound Card
Asus Xonar DG (headphones via FP and speakers via rear jack)
Monitor(s) Displays
Samsung SyncMaster 2032BW
Screen Resolution
1680x1050
Hard Drives
WDC 250gb SATA, Maxtor 120gb IDE
PSU
Antec Earthwatts 650W
Case
Enermax
Cooling
1x120mm, 3x80mm Fans
Keyboard
Dell SK 8125 Enhanced Multimedia Keyboard
Mouse
Sharkoon Fireglider
Internet Speed
8 mbps (supposedly)
Other Info
Microsoft GameVoice, Microsoft Sidewinder Joypad
i'm not getting help either - no-ones helping wid my dvd problem!
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
The Dominator?
OS
Windows Seven Ultimate
CPU
AMD Piledriver FX 8320 @ 3.5GHz
Motherboard
ASUS M5A97 EVO R2.0
Memory
Crucial Ballistix 8GB 1600 MHz DDR3
Graphics Card(s)
ASUS GeForce GTX 970 Strix Edition @ 1.114 GHz
Sound Card
Integrated
Monitor(s) Displays
LG 23EA63V 23" IPS 1080p Monitor
Screen Resolution
1920x1080
Hard Drives
Samsung SSD 840 EVO 120 GB
1x WD GreenPower 500GB 7200RPM
1 External HDD 1TB
PSU
Corsair CX500
Case
Zalman Z9 Plus
Cooling
CPU - Corsair Hydro H80i, Case - 3x Aerocool Shark Edition
Keyboard
Xenta Backlit Keyboard (Not very good!)
Mouse
Logitech G400
Internet Speed
Download: 7 mb/s Upload: 0.76 mb/s
Antivirus
Microsoft Security Essentials
Browser
Google Chrome
Other Info
Overclockers UK Desk Pad 89 x 45 cm
1200x730x600mm Desk
Using Virtual Audio Cable to split stereo sound into Audio Technica ATH-M50 headphones and Logitech X-530 speakers.
I don't know much about your problem, but I've given my 2 pence worth and hope it helps.

Can someone please HELP me!
 
Last edited:

My Computer My Computer

Computer Manufacturer/Model Number
Custom
OS
Windows 7 x64 Home Premium
CPU
Intel Q6600 @ stock
Motherboard
ASUS P5N-E SLI (Bios 1301)
Memory
6GB DDR2 6400 Crucial Ballistix (4-4-4-12-2T)
Graphics Card(s)
Gigabyte GeForce 560 OC 1GB @ stock
Sound Card
Asus Xonar DG (headphones via FP and speakers via rear jack)
Monitor(s) Displays
Samsung SyncMaster 2032BW
Screen Resolution
1680x1050
Hard Drives
WDC 250gb SATA, Maxtor 120gb IDE
PSU
Antec Earthwatts 650W
Case
Enermax
Cooling
1x120mm, 3x80mm Fans
Keyboard
Dell SK 8125 Enhanced Multimedia Keyboard
Mouse
Sharkoon Fireglider
Internet Speed
8 mbps (supposedly)
Other Info
Microsoft GameVoice, Microsoft Sidewinder Joypad
Please can someone HELP!

It's driving me mad and I'm getting very concerned that this new Windows file allocation management system is still buggy!!

Right click on your folder and select permissions.

Edit the permissions to allow regular users to be able write to the folder.

Even though you are an administrator of the computer, does not mean you can just make and copy files wherever you want.

As it was suggested above, you need to look into the right procedures for developing in win 7. There are specific places that you need to have user modifiable files located.
 

My Computer My Computer

Computer Manufacturer/Model Number
Lenovo T60 TYPE 87414FU
OS
Windows 7 Profesional 32-bit (6.1, Build 7600) RTM - TechNet
CPU
Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz (2 CPUs)
Memory
2gb
Graphics Card(s)
ATI Mobility Radeon X1400
Screen Resolution
1680 x 1050 (32 bit) (60Hz)
Mouse
ThinkPad UltraNav Pointing Device
i'm not getting help either - no-ones helping wid my dvd problem!

domii123

Your post is not going to get much attention here and is off topic to MDB file will not overwrite or copy. No problem just a heads up. You might want to post it in the correct section and you may get help\

Ken
 

My Computer My Computer

Computer Manufacturer/Model Number
HP Pavillion dv-7 1005 Tx
OS
Win 8 Release candidate 8400
CPU
[email protected]
Memory
4 gigs
Graphics Card(s)
Nvidia 9600M
Sound Card
HD built-in
Monitor(s) Displays
17" Wxga
Screen Resolution
1440x900
Cooling
none
Internet Speed
45Mb down 5Mb up
Right click on your folder and select permissions.

Edit the permissions to allow regular users to be able write to the folder.

bearhawk, that worked like a charm so thank you for your sound advice!

I still think it was bizarre that even though I'd deleted the old file and then copied the new one over, it still opened the original old file. It's like there was still a 'ghost copy' of it on the system somewhere else, excluding the recycle bin though as I bypassed it.
 

My Computer My Computer

Computer Manufacturer/Model Number
Custom
OS
Windows 7 x64 Home Premium
CPU
Intel Q6600 @ stock
Motherboard
ASUS P5N-E SLI (Bios 1301)
Memory
6GB DDR2 6400 Crucial Ballistix (4-4-4-12-2T)
Graphics Card(s)
Gigabyte GeForce 560 OC 1GB @ stock
Sound Card
Asus Xonar DG (headphones via FP and speakers via rear jack)
Monitor(s) Displays
Samsung SyncMaster 2032BW
Screen Resolution
1680x1050
Hard Drives
WDC 250gb SATA, Maxtor 120gb IDE
PSU
Antec Earthwatts 650W
Case
Enermax
Cooling
1x120mm, 3x80mm Fans
Keyboard
Dell SK 8125 Enhanced Multimedia Keyboard
Mouse
Sharkoon Fireglider
Internet Speed
8 mbps (supposedly)
Other Info
Microsoft GameVoice, Microsoft Sidewinder Joypad
... I still think it was bizarre that even though I'd deleted the old file and then copied the new one over, it still opened the original old file. It's like there was still a 'ghost copy' of it on the system somewhere else....

Your welcome, glad to help.

I have see the problem before. It gives you every indication that it replaced the file, but it was still the old one.

Permissions, permissions permissions
 

My Computer My Computer

Computer Manufacturer/Model Number
Lenovo T60 TYPE 87414FU
OS
Windows 7 Profesional 32-bit (6.1, Build 7600) RTM - TechNet
CPU
Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz (2 CPUs)
Memory
2gb
Graphics Card(s)
ATI Mobility Radeon X1400
Screen Resolution
1680 x 1050 (32 bit) (60Hz)
Mouse
ThinkPad UltraNav Pointing Device

My Computer My Computer

OS
Windows 7
try this-- it worked for me

Hi Okran--

I just went into the Windows Firewall, and added a new rule to it and pointed the rule to windows86/program files/microsoft office/office11/MSACCESS.EXE

that seemed to work. I can now get into and see my access database.
 

My Computer My Computer

OS
Windows 7
Back
Top