Click here to Skip to main content
15,908,626 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using visual studio 2005 pro and have SQL 2005 server express.

From in VS I create a project and add a database (mdf file). I want to do a bulk insert of data I have into the mdf file from within VS. I have figured out how to do this by attaching the mdf file to SQL server but if I detach I cannot use the file as it says access denied.
Posted

1 solution

That is correct. Once you detach the file, you will not be able to insert data.
You need to have a connection to the physical file storage to do any sort of insert, bulk or otherwise.
 
Share this answer
 
Comments
VJ Reddy 26-Apr-12 13:54pm    
Nice answer. 5!
Abhinav S 27-Apr-12 2:30am    
Thanks VJ.
Monjurul Habib 27-Apr-12 3:13am    
5!
Abhinav S 27-Apr-12 3:55am    
Thank you Monjurul.

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