如何在Windows应用程序中运行多个sql语句 [英] How to run multiple sql statement in windows application
本文介绍了如何在Windows应用程序中运行多个sql语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用sql server 2008创建了一个小的Windows应用程序,我想运行脚本包含我的应用程序的表查询,程序和先决条件数据。我想从同一个应用程序运行脚本,我怎样才能完成这个任务。
提前thx
解决方案
如果你想执行整个脚本而不仅仅是单独的语句,你可以在这里看看:
http://weblogs.asp.net/jgalloway /archive/2006/11/07/Handling-_2200_GO_2200_-Separators-in-SQL-Scripts-_2D00_-the-easy-way.aspx [ ^ ]
http://haacked.com/archive/2007/11/04/a-library-for-executing-sql-scripts-with-go-separators-and.aspx [ ^ ]
I have created a small windows application using sql server 2008, i want to run the script contains table queries, procedures and prerequisite data of my application. I want to run the script from the same application, how can i achieve this task.
thx in advance
解决方案
If you want to execute whole scripts and not just stand-alone statements, you could look around here:
http://weblogs.asp.net/jgalloway/archive/2006/11/07/Handling-_2200_GO_2200_-Separators-in-SQL-Scripts-_2D00_-the-easy-way.aspx[^]
http://haacked.com/archive/2007/11/04/a-library-for-executing-sql-scripts-with-go-separators-and.aspx[^]
这篇关于如何在Windows应用程序中运行多个sql语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文