public ExecuteFile ( string filePath, string basePath = null ) : bool | ||
filePath | string | The SQL file to execute |
basePath | string |
/// The base path to use to qualify relative path of any included files that are to be executed.
/// If not supplied this will default to the directory path containing |
return | bool |
/// <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); }
/// <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); }