批量插入mdf文件 [英] Bulk insert to mdf file

查看:82
本文介绍了批量插入mdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2005 Pro,并具有SQL 2005 Server Express.

在VS中,我创建一个项目并添加一个数据库(mdf文件).我想从VS中将我拥有的数据批量插入mdf文件中.我已经想出了如何通过将mdf文件附加到SQL Server来执行此操作,但是如果我分离,则无法使用该文件,因为它说访问被拒绝.

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.

推荐答案

正确的.分离文件后,将无法插入数据.
您需要连接到物理文件存储,才能进行任何类型的插入,批量或其他方式.
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.


这篇关于批量插入mdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆