AspÊý¾Ý²Ù×÷×é¼þ(°ÙÍò¼¶·ÖÒ³)(Ð޸İæ)
ÔÎÄÒýÓÃ:
http://www.17558.net/cmd.asp?act=tb&id=16&key=43840
ÔÎĵØÖ·:http://www.17558.net/post/16.html
żÊÇÒ»¸öµ×²ãµÄASP¼¼ÊõÈËÔ±(ÊôÓÚ°ë·³ö¼ÒµÄÄÇÖÖ,ÒÔÇ°ÊÇÒ»ÃûÍøÂç¼¼ÊõÈËÔ±),×î½ü²ÎÓëÖÆ×÷Ò»¸öCRMϵͳ,¼Ü¹»²ÉÓÃASP+SQL,¿¼Âǵ½ÒÔºóÊý¾Ý²éѯЧÂÊÎÊÌâ,ËùÒÔÔÚÍøÉÏÕÒÁËÒ»¸ö AspÊý¾Ý²Ù×÷×é¼þ(°ÙÍò¼¶·ÖÒ³) ,ʵÓû·¾³£ºAsp£«DLL£«MsSQL(Õâ¸öÍøÉϺܶàµØ·½¶¼¿ÉÒÔÏÂÔØ),²¢ÇÒÆäÖнáºÏSQL´æ´¢¹ý³Ì,˵ʵ»°ÒÔÇ°SQL´æ´¢¹ý³Ì½Ó´¥µÄ±È½ÏÉÙ,ËùÒÔÔÚµ÷ÊÔ¸Ã×é¼þµÄʱºòÓöµ½ÁËһЩÎÊÌâ,²¢ÊÔןÄÁËÒ»ÏÂ(×÷Õß±ðÉúÆø(^..^)),¸ßÊÖÃDZðЦ»°ÎÒ¡£
Ô´úÂëÈçÏ£º
ÓзÖÒ³ÁбíÊý¾Ý£º
cls.tblName="Tablename" '±íÃû
cls.fldName="Id" 'ÅÅÐò¹Ø¼ü×Ö¶Î
cls.PageIndex=Request("P")*1 'µ±Ç°Ò³Âë
cls.PageSize=20 'ÿҳÁÐÊý
cls.OrderType=1 'ÅÅÐò·½Ê½£¬0 ¡¢1
cls.strWhere=StrW '²éѯÌõ¼þ£¬²»´øWhere
cls.ListUrl="?Y="&Y&"&M="&M&"&D="&D&"&Sn="&Sn&"&P=" ·ÖÒ³URL
Set Rs=cls.Result
do while not rs.eof
rs.movenext
loop
·ÖÒ³Êý¾Ý cls.page
ÔÚÔÎĵÄʹÓÃ˵Ã÷ÖУ¬ÔÚ·Ò³´úÂëÖжԱí²éѯĬÈÏÊÇÈ«²¿×Ö¶ÎÒ²¾ÍÊÇ*£¬ÕâÑùÊDz»ÊÇ»áÀË·Ñ×ÊÔ´£¬¶øÎÞ·¨²éѯÐèÒªµÄ×ֶΣ¬ÓÚÊÇÎÒÔÚDLL´úÂëÖÐмÓÈëÒ»¸ö±äÁ¿ÃûΪzdName£¬×÷Ϊ´«µÝ¿É¿ØÖƲéѯÌõ¼þµÄ±äÁ¿£¬Í¬Ê±ÔÚSQL´æ´¢¹ý³ÌÖÐÒ²¼ÓÈëÏàÓ¦µÄ½ÓÊܱäÁ¿@zdName ×Ö·ûÐÍ¡£
ÔÚÕâ¸öСÎÊÌâ½â¾öºó£¬ÓÖÔÚʹÓÃÉÏ·¢ÏÖcls.strWhere¸¶¸øËüµÄ±äÁ¿StrW Èç¹ûÌõ¼þ±äÁ¿ÆäÖдøÓÐÀàËÆ ÀýÈç a='b'ÔòÖ´ÐÐSQL´æ´¢¹ý³Ìʱºò»áÌáʾ´íÎ󣬺óÀ´·¢ÏÖÊÇDLL´úÂëÖУº
sql = "exec GetList " & tblName & "," & fldName & "," & PageSize & "," & PageIndex & "," & OrderType & ",'" & strWhere & "' "
Õâ¸öµØ·½ÊÇ·ñдµÄ²»¹»ÑϽ÷£¬ÔÚStrWÖÐÈç¹ûº¬Óе¥Òý£¬ÄÇô½«ÎÞ·¨Ö´ÐУ¬ËùÒÔÎÒÔÚDLLµÄVB´úÂë¸Ä³É
If InStr(strWhere, "'") <> 0 Then
sql = "exec GetList " & tblName & "," & fldName & "," & PageSize & "," & PageIndex & "," & OrderType & ",""" & strWhere & """ "
 
Ïà¹ØÎĵµ£º
µÚ¶þ¸öÖØÒªµÄÀà,×÷ÓÃÊÇÀàÐÍת»»,ÀàÃûCon_Convert.ÔÚÒ³Ãæ´úÂëµÄ¿ªÍ·ÊµÀý»¯,¶ÔÏóÃûΪConvert,½èÓÃÁË.netµÄÀàÐÍת»»µÄ¶ÔÏóÃû³Æ.
Õâ¸öÀàÖ÷Òª½â¾öÔÚÀàÐÍת»»Ê±,Èç¹ûÖ±½ÓʹÓÃÀàÐÍת»»º¯Êý,»áÒòΪ±äÁ¿Îª¿Õ»òÕ߸ñʽ²»¶Ô¶øµ¼Ö³ÌÐò±¨´í,¶øÕâÖÖ±¨´ ......
<%
Response.Buffer = true
Response.Clear
dim url
Dim fso,fl,flsize
dim Dname
Dim objStream,ContentType,flName,isre,url1
Dim strFileName
strFileName=replace(replace(Request("file"),"\",""),"/","") '´«²Î
strFileName="/files/"&strFileName ' ¸Ä³ÉÄãÄãÎļþµÄ´æ ......
¼ÇµÃÔÚ½¨Á¢Ò»¸öÎļþ¼Ð"updata"
saveannounce_upload.asp ÉÏ´«Ò³
------------------------------------
<html>
<head>
<style type="text/css
">
body {font-size:9pt;}
input {font-size:9pt;}
</style>
<title>ÎļþÉÏ´«</title>
</head& ......
CREATE PROCEDURE sp_newpage
@tb varchar(50), --±íÃû
@col varchar(50), --°´¸ÃÁÐÀ´½øÐзÖÒ³
@coltype int, --@colÁеÄÀàÐÍ,0-Êý×ÖÀàÐÍ,1-×Ö·ûÀàÐÍ,2-ÈÕÆÚʱ¼äÀàÐÍ
@orderby bit, --ÅÅÐò,0-˳Ðò,1-µ¹Ðò
@collist varchar(800),--Òª²éѯ³öµÄ×Ö¶ÎÁбí,*±íʾȫ²¿×Ö ......
Ö»ÄÜÊäÈë1¸öÊý×Ö
±í´ïʽ ^\d$
ÃèÊö Æ¥ÅäÒ»¸öÊý×Ö
Æ¥ÅäµÄÀý×Ó 0,1,2,3
²»Æ¥ÅäµÄÀý×Ó
Ö»ÄÜÊäÈën¸öÊý×Ö
±í´ïʽ ^\d{n}$ ÀýÈç^\d{8}$
ÃèÊö Æ¥Åä8¸öÊý×Ö
Æ¥ÅäµÄÀý×Ó 12345678,22223334,12344321
²»Æ¥ÅäµÄÀý×Ó
Ö»ÄÜÊäÈëÖÁÉÙn¸öÊý×Ö
±í´ïʽ ^\d{n,}$ ÀýÈç^\d{8, ......