如何在vb .net winform项目中以编程方式创建SQL Server数据库 [英] How to create a sql server database programmatically within a vb .net winform project
问题描述
我正在创建一个使用sql server 2008数据库的vb .net winform项目。我或多或少完成了项目,但我想稍微调整一下。其中一项调整如下。我在sql server 2008中创建了数据库,但我想知道如何在vb .net项目中以编程方式创建数据库。我在这个问题上搜索了互联网,但对我来说没有什么是清楚的。我是在开始表单中创建数据库还是在单独的类中创建数据库并以我使用数据库的其他形式调用它?任何有关此事的帮助将不胜感激。
I am creating a vb .net winform project that uses a sql server 2008 database. I have the project more or less finished but I want to tweak it a bit. One of the tweaks is as follows. I have created the database within sql server 2008 but I am wondering how do I go about programmatically creating the database within the vb .net project. I have searched the internet on this matter but nothing is clear enough for me. Do I create the database within the opening form or do I create it in a separate class and call it in the other forms I am using the database in? Any help with this matter would be greatly appreciated.
推荐答案
请尝试以下链接寻求帮助 -
如何使用ADO.NET和Visual Basic .NET以编程方式创建SQL Server数据库 [ ^ ]
在VB.NET中以编程方式编写SQL Server数据库 [ ^ ]
以编程方式创建SQL数据库 [ ^ ]
Try the following links for assistance -
How to create a SQL Server database programmatically by using ADO.NET and Visual Basic .NET[^]
SQL Server database programmatically in VB.NET[^]
Create a SQL Database Programmatically[^]
这篇关于如何在vb .net winform项目中以编程方式创建SQL Server数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!