Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
VB
Error   1   Unable to copy file "G:\parolls\Payroll system\win_VB\win_VB\payroll.mdf" to "bin\Release\payroll.mdf". The process cannot access the file 'G:\parolls\Payroll system\win_VB\win_VB\payroll.mdf' because it is being used by another process.   win_VB


i am getting the above error..please tell me what to do..
Posted
Comments
manognya kota 5-Sep-12 6:09am    
When and where are you getting this error?
[no name] 5-Sep-12 6:13am    
when i am building the application i m getting this error in VS2008
bluesathish 5-Sep-12 6:43am    
Try this, Go to Build menu then click Clean solution, And then click Build solution.
[no name] 5-Sep-12 6:46am    
same thing..


Error 1 Unable to copy file "G:\parolls\Payroll system\win_VB\win_VB\payroll.mdf" to "bin\Release\payroll.mdf". The process cannot access the file 'G:\parolls\Payroll system\win_VB\win_VB\payroll.mdf' because it is being used by another process. win_VB

Error 2 Unable to copy file "G:\parolls\Payroll system\win_VB\win_VB\payroll_log.ldf" to "bin\Release\payroll_log.ldf". The process cannot access the file 'G:\parolls\Payroll system\win_VB\win_VB\payroll_log.ldf' because it is being used by another process. win_VB
bluesathish 5-Sep-12 6:51am    
ok then, clear all temp files in your system and Rebuild the solution.
For go to temp folder, Start -> Run -> %temp%.

Goto build->clean solution then Again goto Build->Rebuild solution. Then run the application. Hope this will help you.

Regards,
Bluesathish
 
Share this answer
 
this error is occur when file is just create and you try to access, without close.

check your coding.
 
Share this answer
 
Comments
[no name] 5-Sep-12 6:24am    
i checked but still same thing..
[no name] 5-Sep-12 6:33am    
then check user rights..
[no name] 5-Sep-12 6:51am    
no such issues..
If you are getting this error when you are building the application in VS2008, please verify the Pre/Post Events of the project.

To check that select 'Project -> Project properties'.

You'll get the Project properties dialog box. In the left pane of the dialog, select 'Build Events'. Check all the events available (if any) under this tab.
 
Share this answer
 
Comments
[no name] 5-Sep-12 6:40am    
i am not getting the option u told..i m using VS2008
Malli_S 5-Sep-12 7:02am    
Are you able to open project properties ?
Select 'Project' menu, and then select '<ProjectName> Properties' option.
Or simply pres Alt Key and F7 key simultaneously.
Please close your all data connections before copy the database file, if you
are using the same database file in your application.
"dataconnection.close()" use this method to close your data connection.
dataconnection is the name of your connection.
 
Share this answer
 
Comments
[no name] 5-Sep-12 8:20am    
where to use this method...??
Raghubir_Sarkar 6-Sep-12 4:34am    
Just before the code for copy the database file(.mdf).
Dave Kreskowiak 10-Apr-13 7:15am    
That's nice. Too bad it has nothing to do with his problem as the error he's getting is at compile time, not run time.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900