Project Description
This project is a class library written in c# which is used for executing *.sql files in remote server.

Simply one dll file. You include it in your web project, add using statement at the top of your page, pass the parameters inside. Rest, it will do.

(See downloads section for sample files.)

Sample Code:
SqlFileExecuter sfe = new SqlFileExecuter();
SqlConnection sqlcon = new SqlConnection(ConfigurationManager.ConnectionStrings"YOURCONNECTIONNAME".ConnectionString);

sfe.FileUrl = Server.MapPath("~/TempFiles/");
sfe.DestinationConnection = sqlcon;
sfe.CommandTimeOut = 600;
Response.Write(sfe.Execute());


(Actually I've developed the idea of: http://weblogs.asp.net/scottgu/archive/2007/01/11/tip-trick-how-to-upload-a-sql-file-to-a-hoster-and-execute-it-to-deploy-a-sql-database.aspx and http://sqlhost.codeplex.com/wikipage?title=UploadAndExecute&ProjectName=sqlhost)

Last edited Jul 28, 2010 at 12:37 AM by Offshoot, version 6