[英]Load .sql file to a DataSet or DataTable with C#
Is it possible to load a .sql
file into a DataSet
or DataTable
without executing it on a SQL Server database and then read the values from the database? 是否可以将
.sql
文件加载到DataSet
或DataTable
而不在SQL Server数据库上执行该文件,然后再从数据库中读取值?
I know the way to load the .sql
file into SQL Server and then read out the values, but is there a way to skip this because I don't have the option to create a SQL Server on the PC at the moment. 我知道将
.sql
文件加载到SQL Server中然后读出值的方法,但是有一种方法可以跳过此操作,因为目前我无法选择在PC上创建SQL Server。
The .sql
file has a CREATE TABLE
statement and a INSERT INTO
query with some data .sql
文件具有CREATE TABLE
语句和带有一些数据的INSERT INTO
查询
Greetz. 格尔茨。
In-Memory SQSQLite or SQL Server CE maybe? 内存中的SQSQLite还是SQL Server CE? Depends on whats in your SQL file, and if there are any SQL Server specific statements.
取决于SQL文件中的内容以及是否有任何SQL Server特定的语句。
In that case it pretty much boils down to 在那种情况下,它可以归结为
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.