lukecl / com.rusanu.dbutil

SQLCMD mode SQL script execution library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DbUtilSqlCmd

SQLCMD mode SQL script execution library. Allows your .Net application to run .sql files against SQL Server. Handles the batch delimiters (GO) and SQLCMD mode commands like :setvar or :connect.

C# Static Method Example

using com.rusanu.DBUtil;

SqlCmd.ExecuteFile(SqlConnection, @"The\Path\To\Your\Sp.sql");

C# Instance Method Example

using com.rusanu.DBUtil;

var inst = new SqlCmd(SqlConnection)
inst.ExecuteFile(@"The\Path\To\Your\Sp.sql");

NuGet

Available on NuGet.org as com.rusanu.DBUtil

About

SQLCMD mode SQL script execution library


Languages

Language:C# 100.0%