Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

asp²Ù×÷Êý¾Ý¿âµÄui

 <!--#include file="conn.asp"-->
<!--#include file="inc/head.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn" xmlns:qz="http://qzone.qq.com/">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="gb2312" />
<title>²âÊÔ</title>
</head>
<body style="margin:10px;">
 <form action="" method="post">
<textarea name=sql rows=5 style="width:100%" onkeypress="if(event.keyCode==10)submit.click()"><%=request("sql")%></textarea><BR>
<input type=submit id=submit style="width:20%"  >
<input type=input name=pass style="width:75%"  value="<%=request("pass")%>">
</form>
<%
function tip(text)
 response.write(text)
end function
 
if request("sql") = "" then
   tip ("ȱÉÙsqlÓï¾ä<BR>")
elseif request("pass") <> "pass" then
   tip ("ÃÜÂë²»¶Ô<BR>")
else
   dosql()
end if
sub dosql()
   dim result, startTime, lastId, ri
   startTime = now()
   set result = conn.execute(request("sql"))
   if result.State = 1 then
      while(  result.EOF = False )
  
        for ri = 0 to 999
         on error resume next
         tip ri&".&nbsp;&nbsp;"&result(ri).name & ": " & result(ri) & "<BR>"
     
         if err.number <> 0 then
           exit for
        &n


Ïà¹ØÎĵµ£º

ʹÓÃASPÑéÖ¤emailÓÊÏäµØÖ·

<%
'true=ÊÇÓʼþ;false=²»ÊÇ;
Function validate(ByVal str)
Dim temp,reg
Set reg = new regexp
reg.ignorecase=true
reg.global=true
reg.pattern = "^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"
validate = reg.test(Trim(str))
Set reg = Nothing
End Function
'************************ ......

aspµ÷ÓÃsql server´æ´¢¹ý³Ì

ASPµ÷Óô洢¹ý³ÌµÄ·½·¨£º    
 
----  ¡¡¡¡µ÷Óô洢¹ý³ÌµÄ·½·¨ÐèҪʹÓÃADOµÄCommand¶ÔÏó¡£Command¶ÔÏóÊǶÔÒ»¸öÊý¾ÝÔ´ÔËÐÐÌض¨ÃüÁîµÄ¶¨Ò壨ÀýÈ磬һ¸öSQL²éѯ»òÒ»¸öSQL´æ´¢¹ý³Ì£©¡£ÏÂÃæÒÔMS  SQL  SERVER6.5Ϊºǫ́Êý¾Ý¿â£¬½éÉÜASPµ÷Óô洢¹ý³ÌµÄ·½·¨¡£    
 
----  ¡ ......

asp³£ÓõÄÕýÔò±í´ïʽʵÏÖ×Ö·û´®µÄÌæ»»


asp³£ÓõÄÕýÔò±í´ïʽʵÏÖ×Ö·û´®µÄÌæ»»,Ö÷Òª°üÀ¨È¥³ýhtml±êÇ©£¬È¥³ýclass±êÇ©ºÍÈ¥³ýscript±êÇ©µÈ
È¥³ýhtml±êÇ©ÕýÔò<\/*[^<>]*>
Function LoseHtml(ContentStr)
Dim ClsTempLoseStr,RegEx
ClsTempLoseStr = Cstr(ContentStr)
Set RegEx = New RegExp
RegEx.Pattern = "<\/*[^<>]*>"
......

ASPÖÐʹÓÃSQLServerµÄÊÂÎñ¿ØÖƼ°ÅúÖ´ÐÐSqlÓï¾ä

<%
   SQL1 = "update table1 set a=b where id=1"
   Conn.ExeCute SQL1
    SQL2 = "update table2 set a=b where id=2"
   Conn.ExeCute SQL2
   SQL3 = "update table3 set a=b where id=3"
   Conn.ExeCute SQL3
%>
  &nb ......

ÈçºÎÌá¸ßaspµÄSQLµÄÖ´ÐÐЧÂÊÌá¸ßÊý¾Ý¿â¶ÁÈ¡ËÙ¶È

·½·¨Ò»¡¢¾¡Á¿Ê¹Óø´ÔÓµÄSQLÀ´´úÌæ¼òµ¥µÄÒ»¶Ñ SQL.
ͬÑùµÄÊÂÎñ£¬Ò»¸ö¸´ÔÓµÄSQLÍê³ÉµÄЧÂʸßÓÚÒ»¶Ñ¼òµ¥SQLÍê³ÉµÄЧÂÊ¡£Óжà¸ö²éѯʱ£¬ÒªÉÆÓÚʹÓÃJOIN¡£
oRs=oConn.Execute("SELECT * from Books")
while not oRs.Eof
strSQL = "SELECT * from Authors WHERE AuthorID="&oRs("AuthorID") oRs2=oConn.Execute(strSQ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ