如何在asp.net应用程序中生成sql脚本(带数据的模式)。 [英] how to generate sql script(schema with data) in asp.net application.?

查看:96
本文介绍了如何在asp.net应用程序中生成sql脚本(带数据的模式)。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。



我的问题是,如何在ASP.NET应用程序中生成sql脚本(带数据的模式)?



因此我们每天使用我的asp.net应用程序保留sql数据库脚本。我不想继续使用sql server来获取脚本(带数据)。

Hello everyone

My question is, how to generate sql script (schema with data) in ASP.NET application?

So that we keep sql database script everyday using my asp.net application. I don't want to go on sql server to take script (with data).

推荐答案

由于它是一个ASP.NET项目,MSDN会是一个好朋友你可以找到更多关于ASP.NET的API以及你可以在你的代码中使用的类。



http://msdn.microsoft.com/en-us/library/ms254934(v=vs.110).aspx [ ^ ](GetSchema和Schema Collections)。



从上面的MDSN文档中,



Since it is an ASP.NET project, MSDN would be a good friend of yours to find more about the API of ASP.NET and the classes that you can use in your code.

http://msdn.microsoft.com/en-us/library/ms254934(v=vs.110).aspx[^] (GetSchema and Schema Collections).

From the MDSN document above,

Quote:

每个.NET Framework托管提供程序中的Connection类实现一个GetSchema方法,该方法用于检索有关当前连接的数据库的架构信息。

The Connection classes in each of the .NET Framework managed providers implement a GetSchema method which is used to retrieve schema information about the database that is currently connected.





因此,使用上述文件,您可以了解如何创建自己的程序,返回当前连接的数据库的模式。



So using the above document you can learn how you can create your own program that would return the schema for the database connected currently.


这篇关于如何在asp.net应用程序中生成sql脚本(带数据的模式)。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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