asp ´æ´¢¹ý³Ì£¨·ÖÒ³£©
CREATE PROCEDURE sp_newpage
@tb varchar(50), --±íÃû
@col varchar(50), --°´¸ÃÁÐÀ´½øÐзÖÒ³
@coltype int, --@colÁеÄÀàÐÍ,0-Êý×ÖÀàÐÍ,1-×Ö·ûÀàÐÍ,2-ÈÕÆÚʱ¼äÀàÐÍ
@orderby bit, --ÅÅÐò,0-˳Ðò,1-µ¹Ðò
@collist varchar(800),--Òª²éѯ³öµÄ×Ö¶ÎÁбí,*±íʾȫ²¿×Ö¶Î
@pagesize int, --ÿҳ¼Ç¼Êý
@page int, --Ö¸¶¨Ò³
@condition varchar(800),--²éѯÌõ¼þ
@RecordCount Int Output,
@pages int OUTPUT --×ÜÒ³Êý
AS
/*
¹¦ÄÜÃèÊö£º¶ÔÖ¸¶¨±íÖÐÂú×ãÌõ¼þµÄ¼Ç¼°´Ö¸¶¨ÁнøÐзÖÒ³²éѯ£¬·ÖÒ³¿ÉÒÔ˳Ðò¡¢µ¹Ðò
²éѯ¿ÉÒÔÖ¸¶¨Ò³´óС¡¢Ö¸¶¨²éѯÈÎÒâÒ³¡¢Ö¸¶¨Êä³ö×Ö¶ÎÁÐ±í£¬·µ»Ø×ÜÒ³Êý
×÷ Õߣºpbsql
°æ ±¾£º1.10
×îºóÐ޸ģº2004-11-29
*/
DECLARE @sql nvarchar(4000),@where1 varchar(800),@where2 varchar(800)
IF @condition is null or rtrim(@condition)=''
BEGIN--ûÓвéѯÌõ¼þ
SET @where1=' WHERE '
SET @where2=' '
END
ELSE
BEGIN--ÓвéѯÌõ¼þ
SET @where1=' WHERE ('+@condition+') AND '--±¾À´ÓÐÌõ¼þÔÙ¼ÓÉÏ´ËÌõ¼þ
SET @where2=' WHERE ('+@condition+') '--Ô±¾Ã»ÓÐÌõ¼þ¶ø¼ÓÉÏ´ËÌõ¼þ
END
SET @sql='SELECT @pages=CEILING((COUNT(*)+0.0)/'+CAST(@pagesize AS varchar)+
') from '+@tb+@where2
EXEC sp_executesql @sql,N'@pages int OUTPUT',@pages OUTPUT--¼ÆËã×ÜÒ³Êý
SET @sql='SELECT @RecordCount=COUNT(*) from '+@tb+@where2
EXEC sp_executesql @sql,N'@RecordCount int OUTPUT',@RecordCount OUTPUT--¼ÆËã×ܼǼ
IF @orderby=0
SET @sql='SELECT TOP '+CAST(@pagesize AS varchar)+' '+@collist+
' from '+@tb+@where1+@col+'>(SELECT MAX('+@col+') '+
' from (SELECT TOP '+CAST(@pagesize*(@page-1) AS varchar)+' '+
@col+' from '+@tb+@where2+'ORDER BY '+@col+') t) ORDER BY '+@col
ELSE
SET @sql='SELECT TOP '
Ïà¹ØÎĵµ£º
¸ÅÊö
¡¡¡¡ASPÊÇActive Server PageµÄËõд£¬ÒâΪ“¶¯Ì¬·þÎñÆ÷Ò³Ã攡£ASPÊÇ΢Èí¹«Ë¾¿ª·¢µÄ´úÌæCGI½Å±¾³ÌÐòµÄÒ»ÖÖÓ¦ÓÃ,Ëü¿ÉÒÔÓëÊý¾Ý¿âºÍÆäËü³ÌÐò½øÐн»»¥£¬ÊÇÒ»ÖÖ¼òµ¥¡¢·½±ãµÄ±à³Ì¹¤¾ß¡£ASPµÄÍøÒ³ÎļþµÄ¸ñʽÊÇ.asp£¬ÏÖÔÚ³£ÓÃÓÚ¸÷ÖÖ¶¯Ì¬ÍøÕ¾ÖС£ ASPÊÇÒ»ÖÖ·þÎñÆ÷¶Ë½Å±¾±àд»·¾³£¬¿ÉÒÔÓÃÀ´´´½¨ºÍÔËÐж¯Ì¬ÍøÒ³»òWebÓ¦ ......
Ç°ÑÔ£º
²»ÉÙÈ˶¼ÍƳçѧϰ±à³Ì×î¼Ñ·½Ê½ÊÇÔÚʵ¼ÊÏîÄ¿ÖÐÄ¥Á·£¬Í¨¹ý½â¾öÏîÄ¿ÖеÄÒ»¸ö¸öʵ¼ÊÎÊÌ⽫Ïà¹ØµÄ֪ʶµãѧÒÔÖÂÓá£×÷Ϊ¸Õ¸ÕÂõÉϱà³Ì/web¿ª·¢×Ôѧ֮·µÄÐÂÊÖ£¬ÎÒ±ã´òË㽫¸Ãѧϰ·½Ê½¼ÓÒÔʵ¼ù£¬²¢Í¨¹ý²©¿Íƽ̨¼Ç¼×Ô¼ºµÄѧϰµãµÎ¡£
ÎҵĵÚÒ»¸öʵ¼ùÏîÄ¿±ãÊÇÁôÑ԰壬֮ËùÒÔÑ¡ÔñASP+AccessÊÇÒòΪ¼òµ¥Ò×Óã¬Èç¹ûÒ»ÇÐ˳Àû´ýÉÏ ......
Ò»°ãÀ´Ëµ±àÊý¾Ý¿âÀàµÄ³ÌÐòÖ÷ÒªÒª½â¾öµÄÎÊÌâÎÞ·ÇÊÇÌí¼Ó£¬É¾³ý£¬Ð޸ĺͲéѯ¡£ÕâÀà±à³Ì¶¼·Ç³£µÄ¼òµ¥¡£½ÓÏÂÀ´ÎÒÀûÓÃÒ»µã¿ÕÓàʱ¼ä·¢Ò»¸öº¯ÊýÀïÃæ°üº¬ºÍÌí¼ÓºÍɾ³ý¹¦ÄÜ¡£ÊµÑéµÄ¼Ü¹¹¿ÉÒÔʹÓÃIIS.5WEB·þÎñÆ÷ACCESSÊý¾Ý¿â¡£Õâ¸öÎÒÆäʵ²»ÓÃ˵µÄºÜÏêϸÁË£¬ÒòΪ´ó¼Ò¶¼Ó¦¸ÃÖªµÀµÄ¡£ÎÒ¾ÍÖ±½Ó°Ñº¯ÊýÌù³öÀ´¡£´ó¼ÒÖ»ÒªÉÔÎ ......
Win2003ÏÂAsp¡¢IISÅäÖü¼ÇÉ
¡¡¡¡windows 2003·ÛÄ«µÇ³¡£¬ºÜ¶à¸Ïʱ÷ÖµÄÓû§ÒѾÔç¾ÍÊÔÓÃÁË£¬µ«¾¡¹Ü2003ºÅ³Æ°²È«ÐÔÓкܴóÍ»ÆÆ£¬µ«ÆäĬÈÏÖ§³Ö.net¼Ü¹¹£¬¶øÅ×ÆúʹÓÃÁ˺ܾõĴóÖÚ»¯µÄAspµÄ·Ïßȱ±¥ÊÜÖÊÒÉ£¬ÐèÒªÎÒÃÇÊÖ¶¯È¥ÅäÖúܶණÎ÷¡£
¡¡¡¡ÔÚ IIS 6.0 ÖУ¬Ä¬ÈÏÉèÖÃÊÇÌرðÑϸñºÍ°²È«µÄ£¬ÕâÑù¿ÉÒÔ×î´óÏ޶ȵ ......
¿´µ½ÓÐÅóÓÑ˵ǰÃæÒ»Õ½²µÃû±ØÒª,ÏëÏëҲȷʵ.±¾À´ÊÇûÓдòËã½²ÕâЩ»ù´¡µÄ,Ö»ÊÇÐÐÎÄÆðÀ´Ã»ÓÐÔ¼Êø,¾Íµ´¿ªµ½»ù´¡ÖªÊ¶ÉÏÃæÁË.
´ÓÕâ½Ú¿ªÊ¼,½«»á¸ø´ó¼Ò½éÉÜASPÖеÄÈý´óͨÓÃÀà,Ëü¹á´©ÓÚÎÒËùÉè¼ÆµÄÈý²ã¼Ü¹¹ÖÐ,ÊǶÔASPÓï·¨µÄÀ©Õ¹,¿ÉÒÔÌá¸ßºÜ¶àϸ½Ú´¦ÀíÉϵÄЧÂÊ,¿ÉÒÔËãÊÇÒ»µãµã¿ò¼ÜµÄζµÀ.
& ......