asp命令执行语句】_MSSQL语句执行工具asp版
发布日期:2022-02-19 00:02:20
浏览次数:7
分类:技术文章
本文共 2346 字,大约阅读时间需要 7 分钟。
刹客网络科技资讯 点击右侧关注,最新科技资讯!
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=
转载地址:https://blog.csdn.net/weixin_34238178/article/details/112128047 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
初次前来,多多关照!
[***.217.46.12]2024年03月23日 13时01分10秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
linux下vi编辑器的命令大全,linux下VI编辑器命令大全(超级完整版)
2019-04-21
C语言极坐标转直角坐标,C语言实现直角坐标转换为极坐标的方法
2019-04-21
16F877A和24C02通信汇编语言,PIC16f877A读写24c02程序
2019-04-21
用c语言编写小于n的所有素数,关于求N以内素数的一点小问题(N小于一亿)
2019-04-21
华为100万部鸿蒙,2019年Q4发布 华为100万部鸿蒙OS手机已开测
2019-04-21
编程之类的文案_如何锻炼写文案的能力?
2019-04-21
vscode 不能使用中文输入法_vscode中vim插件设置
2019-04-21
当集合a为空集时a的取值范围_1.1.2 集合间的基本关系
2019-04-21
vue 可合并表格组件_Vue实战046:详解Mixins混入使用和注意事项
2019-04-21
python包怎么做双重差分did分析_多变量相关性分析(一个因变量与多个自变量)
2019-04-21
fi sap 凭证冲销 稅_SAP中的成本要素
2019-04-21
mysql幻读是什么意思_MySQL中的幻读,你真的理解吗?
2019-04-21
易语言执行mysql命令_易语言通过“打开”命令操作数据库
2019-04-21
mysql slave 1062_mysql主从同步slave错误1062
2019-04-21