如何在运行时使用C#..创建数据库? [英] How to create an database at runtime with c# ..?

查看:67
本文介绍了如何在运行时使用C#..创建数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的应用程序第一次运行时创建一个数据库文件,然后每次都使用该数据库文件.


我在应用程序中使用了我的数据库的SQL脚本.因此,我希望如果该数据库文件不存在于目标位置,那么它将从此SQL脚本自动创建.

I want to create a database file when my application run first time, then use that database file every time.


I have a SQL Script of my DB used in application. so i want that if the database file is not present at the destination then it will create automatically from this SQL Script.

推荐答案

这些可能会帮助您
http://support.microsoft.com/kb/307283 [使用C#创建SQL Server数据库 [
These might help you out
http://support.microsoft.com/kb/307283[^]
Create a SQL Server Database Using C#[^]


它可能对您有帮助,

以编程方式创建数据库MCB [
It might help you,

Creating DB Programmatically MCB[^]

:)


这篇关于如何在运行时使用C#..创建数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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