使用Visual Studio 2008 Professional以Windows形式附加在sql Server 2008中创建的Mdb文件 [英] Attaching a Mdb file created in sql server 2008 in windows form using Visual Studio 2008 professional

查看:117
本文介绍了使用Visual Studio 2008 Professional以Windows形式附加在sql Server 2008中创建的Mdb文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在sql server 2008中创建了一个Mdb数据库,并已使用Visual Studio 2008创建了一个Windows应用程序.我正在使用appconfig文件连接该数据库.

我有几个查询,如下所示:

1.现在,我如何将在sql server 2008数据库中创建的mdb文件附加到我的Visual Studio项目中,以便在创建安装程序时将该数据库作为其他文件包含在其中.我的mdb文件具有过程和视图以及表.

2.运行项目的.exe文件的先决条件是什么.我知道我必须安装.net framework3.0,但是为了运行数据库,我需要安装的所有最低限度的东西才能部署和执行安装文件,如果在客户端中运行.exe文件,则在安装后也要安装该文件.的机器

如果可能的话,请给我提供一些图片图片,我将遵循这些图片并可以完成我的工作.

I have created a Mdb database in sql server 2008 and I have created a windows application using Visual studio 2008. I''m using a appconfig file to connect the Database.

I have few queries which as follows:

1. Now how can I attach the mdb file created in sql server 2008 database into my visual studio project so that when I create a setup then the database would be included into it as the other files. My mdb file has procedure and views along with the tables.

2. What are the prerequisites in order to run the .exe file of the project. I know I have to install .net framework3.0 but in order to run the database what all bare minimum I need to install in order I deploy & executing the setup file and after install it if I run the .exe file in the client''s machine

If possible then please provide me some pictorial images which I would follow and can get my job done.

推荐答案

我不知道您的应用程序,但这听起来很奇怪.

问题是,您根本没有将数据库文件集成到项目中.它打算由SQL Server使用,Visual Studio仅允许您对其进行编辑和测试.

您要执行的操作将要求您的用户在安装程序之前先安装SQL Server.可能会包含数据库文件,并付出一些努力来加载它.

使数据库在服务器上可用并让您的应用程序通过在线连接访问它会更聪明吗?
I don''t know your application, but this sounds strange.

The problem is, that you don''t integrate your database file into your project at all. It is meant to be used by SQL Server, the Visual Studio only allows you to edit and test it.

What you want to do would require your users to install SQL Server before installing your program. It would be possible to include the database file and, with some effort, to load it.

Would it not be smarter to make your database available on a server and let your application access it over an online connection?


我完全同意您的意见,但是我正在开发Windows应用程序,想要创建一个安装程序,用户只需单击该安装程序,然后将产品安装到他们的系统中,而无需担心数据库或文件.因此,这就是为什么我要将sql server mdb文件附加到我的项目中的原因然后创建一个安装程序.我什至在一些演示应用程序中看到过,但不知道他们是如何将其安装或附加到他们的项目中的.我也在使用连接字符串,因此我将对其进行更改以使其正常工作.
I fully agree with you but I''m developing a windows application and would like to create a setup where the user would only click on the setup and install the product into their system without any concern regarding the database or files.It is for this reason only why I want to attach my sql server mdb file into my project and then create a setup. I have even seen in some demo application but donot know how they have installed or attached it to their project.I''m also using a connection string so will I change in it in order to make it working correctly.


这篇关于使用Visual Studio 2008 Professional以Windows形式附加在sql Server 2008中创建的Mdb文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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