<%
dim SqlConnectIp,SqlConnectDatabase,SqlConnectUsername,SqlConnectPassword,sqlLoginTimeout
SqlConnectIp = Request.form("server")
SqlConnectDatabase = Request.form("database")
SqlConnectUsername = Request.form("uid")
SqlConnectPassword = Request.form("pass")
sqlLoginTimeout = 15

Set conn = Server.CreateObject("ADODB.Connection")
Connstr = "driver={SQL Server};server="&SqlConnectIp&";uid="&SqlConnectUsername&";pwd="&SqlConnectPassword&";database="&SqlConnectDatabase
conn.Open connstr

if request("action")="CreatDataBase" then
dim fs,t,x,spath
set fs=Server.CreateObject("Scripting.FileSystemObject")
spath=Server.mapPath("/install/Install.sql")
set t=fs.OpenTextFile(spath,1,false)
conn.execute t.readall
t.close
response.redirect "CreatDataBaseSuccess.html"
end if

%>