- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
DataSqlResult.asp
资源名称:eat.rar [点击查看]
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:4k
源码类别:
数据库编程
开发平台:
ASP/ASPX
- <% Option Explicit %>
- <!--#include file="../FS_Inc/Const.asp" -->
- <!--#include file="../FS_InterFace/MF_Function.asp" -->
- <!--#include file="../FS_Inc/Function.asp" -->
- <!--#include file="../FS_Inc/Func_page.asp" -->
- <%'Copyright (c) 2006 Foosun Inc. Code by Simpwind.Xie
- Response.Buffer = True
- Response.Expires = -1
- Response.ExpiresAbsolute = Now() - 1
- Response.Expires = 0
- Response.CacheControl = "no-cache"
- Dim Sql,Result,ExeResult,ExeResultNum,ExeSelectTF,ErrorTF,FiledObj
- Dim I,ErrObj,conn
- MF_Default_Conn
- MF_Session_TF
- if not MF_Check_Pop_TF("MF017") then Err_Show
- Result = Request.Form("Result")
- if Result = "Submit" then
- Sql = Request.Form("Sql")
- Call MF_Insert_oper_Log("数据库维护","执行SQL语句:"& Request.Form("Sql") &"",now,session("admin_name"),"MF")
- if (Sql <> "") then
- If Instr(1,lcase(Sql),"delete from fs_ns_oper_log")<>0 then
- Sql="Select top 10 * from fs_ns_oper_log order by id desc"
- End If
- ExeSelectTF = (LCase(Left(Trim(Sql),6)) = "select")
- Conn.Errors.Clear
- On Error Resume Next
- if ExeSelectTF = True then
- Set ExeResult = Conn.ExeCute(Sql,ExeResultNum)
- else
- Conn.ExeCute Sql,ExeResultNum
- end if
- If Conn.Errors.Count<>0 Then
- ErrorTF = True
- Set ExeResult = Conn.Errors
- Else
- ErrorTF = False
- End If
- end if
- end if
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <title>执行结果</title>
- </head>
- <link href="images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
- <body topmargin="2" leftmargin="2">
- <%
- if Result = "Submit" then
- if ErrorTF = True then
- %>
- <table width="100%" border="0" cellpadding="3" cellspacing="1" class="table">
- <tr class="xingmu">
- <td height="20" nowrap class="xingmu">
- <div align="center">错误号</div></td>
- <td height="20" nowrap class="xingmu">
- <div align="center">来源</div></td>
- <td height="20" nowrap class="xingmu">
- <div align="center">描述</div></td>
- <td height="20" nowrap class="xingmu">
- <div align="center">帮助</div></td>
- <td height="20" nowrap class="xingmu">
- <div align="center">帮助文档</div></td>
- </tr>
- <%
- For I=1 To Conn.Errors.Count
- Set ErrObj=Conn.Errors(I-1)
- %>
- <tr class="hback">
- <td nowrap class="hback">
- <% = ErrObj.Number %> </td>
- <td nowrap class="hback">
- <% = ErrObj.Description %> </td>
- <td nowrap class="hback">
- <% = ErrObj.Source %> </td>
- <td nowrap class="hback">
- <% = ErrObj.Helpcontext %> </td>
- <td nowrap class="hback">
- <% = ErrObj.HelpFile %> </td>
- </tr>
- <%
- next
- %>
- </table>
- <%
- else
- %>
- <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td><table border="0" cellpadding="4" cellspacing="1" class="table">
- <%
- if ExeSelectTF = True then
- %>
- <tr class="habck">
- <%
- For Each FiledObj In ExeResult.Fields
- %>
- <td nowrap height="26" class="xingmu"><div align="center">
- <% = FiledObj.name %>
- </div></td>
- <%
- next
- %>
- </tr>
- <%
- do while Not ExeResult.Eof
- %>
- <tr class="hback">
- <%
- For Each FiledObj In ExeResult.Fields
- %>
- <td nowrap class="hback"> <div align="center">
- <%
- if IsNull(FiledObj.value) then
- Response.Write(" ")
- else
- Response.Write(FiledObj.value)
- end if
- %>
- </div></td>
- <%
- next
- %>
- </tr>
- <%
- ExeResult.MoveNext
- loop
- else
- %>
- <tr class="xingmu">
- <td class="xingmu" height="26"> <div align="center">执行结果</div></td>
- </tr>
- <tr class="hback">
- <td class="hback"> <div align="center">
- <% = ExeResultNum & "条纪录被影响"%>
- </div></td>
- </tr>
- <%
- end if
- %>
- </table></td>
- </tr>
- </table>
- <%
- end if
- end if
- %>
- <form name="ExecuteForm" method="post" action="">
- <input type="hidden" name="Sql">
- <input type="hidden" name="Result">
- </form>
- </body>
- </html>
- <%
- Set Conn = Nothing
- Set ExeResult = Nothing
- %>