我可以在表单上自动创建数据库提交Btn单击C#.Net [英] Can I Create A Database Automatically On A Form Submit Btn Click In C#.Net

查看:51
本文介绍了我可以在表单上自动创建数据库提交Btn单击C#.Net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果是,那怎么样?数据库应该自动创建。

推荐答案

99.9999%的时间,你不想创建数据库:你通常只会创建它一旦安装了您的应用程序,如果该数据库尚不存在。每次创建数据库都非常浪费,并且会破坏任何现有数据。如果你想在常规或频繁的基础上创造新鲜的东西,你可能最好使用不同的解决方案。



但是: [ ^ ]是如何做到的一个例子,google有很多还有更多: Google [ ^ ]
99.9999% of the time, you don;t want to create a database: you would normally only create it once when your app is installed, if the DB does not exist already. Creating a DB each time is tremendously wasteful, and will destroy any existing data. If you want something created fresh on a regular or frequent basic, you are probably better off with a different solution.

However: Create an SQL Server Database Using C#[^] is one example of how to do it, google has many, many more: Google[^]


这篇关于我可以在表单上自动创建数据库提交Btn单击C#.Net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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