com.rusanu.DBUtil.SqlCmd.ExecuteFile C# (CSharp) Method

ExecuteFile() public static method

Executes a SQL file on the given connection
public static ExecuteFile ( SqlConnection conn, string filePath ) : void
conn System.Data.SqlClient.SqlConnection Connection to execute the file on
filePath string
return void
		public static void ExecuteFile (
			SqlConnection conn,
			string filePath) {
			var sqlCmd = new SqlCmd (conn);
			sqlCmd.ExecuteFile (filePath);
		}

Same methods

SqlCmd::ExecuteFile ( string filePath, string basePath = null ) : bool

Usage Example

コード例 #1
0
ファイル: SqlCmd.cs プロジェクト: yasser10/Henalux
        /// <summary>
        /// Executes a SQL file on the given connection
        /// </summary>
        /// <param name="conn">Connection to execute the file on</param>
        /// <param name="file">The SQL file being executed</param>
        public static void ExecuteFile(
            SqlConnection conn,
            string filePath)
        {
            var sqlCmd = new SqlCmd(conn);

            sqlCmd.ExecuteFile(filePath);
        }
All Usage Examples Of com.rusanu.DBUtil.SqlCmd::ExecuteFile