¹ØÓÚASP Recordset ·ÖÒ³³öÏÖ¸ºÊý½â¾ö·½·¨¼°½¨Òé
¶ÔÓÚRecordset·Öҳʱ³öÏÖ¸ºÊýµÄÏÖÏó£¬ÏàÐÅ»áÓкܶàÈËÓöµ½¹ýÕâ¸öÎÊÌ⣬ÓÐʱ°Ù¶È¡¢GOOGLEÒ²²»µÃÆä½â£¬ÏÖÔÚÓÉÎÒÀ´×ܽáһϡ£
³öÏÖ¸ºÊý£¬Ö÷ÒªºÍÓαêÀàÐÍÓйØϵ¡££¨Îª¾ÙÀý·½±ã£¬¼ÙÉèÒѾÓÐÒ»¸öconn.aspÁ´½ÓÊý¾Ý¿âµÄÎļþ²¢ÇÒÒѾinclude£©ÏÖÔÚ¾ÙÒ»¸öÀý×Ó£¬´úÂëÈçÏ£º
'=======================================================
sql="Select * from ±íÃû where Ìõ¼þ order by ID desc" 'ÕâÀïµÄorder by Ìõ¼þ¿É¸ù¾Ý×Ô¼ºÐèÒª¸Äд
Set rs=conn.execute(sql) '===×¢ÒâÒ»ÏÂÕâÒ»¾ä===
rs.pagesize=10 '===ÉèÖÃÿҳµÄ¼Ç¼ÊýΪ10===
page=request.querystring("page")
If page="" Then page=1
If Not IsNumeric(page) Then page=1
page=clng(page)
If page<1 Then page=1
If page>rs.pagecount Then page=Vrs.pagecount
rs.absolutepage=page
dim c
c=1
Do while Not rs.eof And c<=rs.pagecount
'Êä³öÄÚÈÝ
c=c+1
rs.movenext
Loop
'×öÒ³ÃæµÄÁ´½Ó
'=======================================================
¸ù¾ÝÉÏÃæµÄ´úÂ룬RecordSet¶ÔÏóÖ±½ÓÓÉ´úÂ룺Set rs=conn.execute(sql)£¬Ê¹Óøþäºó£¬RecordSe
Ïà¹ØÎĵµ£º
½ÌѧÄÚÈÝ
ASP¶¯Ì¬ÍøÒ³Éè¼Æ¼¼ÊõÌåϵ½á¹¹
ASPÖ÷Òª¹¹³ÉÔªËصŦÄܼ°Ó÷¨
ASP¶¯Ì¬ÍøÒ³Éè¼ÆʵÀý
ÖصãºÍÄѵã
asp¶¯Ì¬ÍøÒ³Éè¼Æ¼¼ÊõÌåϵ½á¹¹
asp¶¯Ì¬ÍøÒ³Éè¼ÆµÄ·½·¨
Ç°µ¼ÖªÊ¶
½Å±¾ÓïÑÔ——vbscript»òjavascript
Êý¾Ý¿â֪ʶ——SQL
²ÎÔÄ×ÊÁÏ
HTTP://WWW.w3schools.com
ÍƼöÈí¼þ£ºAdobe Dreamweaver ......
Çë¿´ÈçÏÂÔ´´úÂ룺
<%
'ÏòÊý¾Ý¿âдÈëÊý¾Ý
SUB writeData()
dim recCnt,i
dim fieldName1,fieldName2,fieldName3
dim conn
dim sqlStr,connStr
connStr="Provider=SQLOLEDB.1;Initial Catalog=myDatabase;Data Source=myhon;User Id=sa;PASSWORD="
set conn=Server.CreateObject("ADODB.Connection")
c ......
À¶ÑÀ»µµôÁË£¬ÕâÑùÒ»À´ ÊÖ»ú°²×°³ÌÐò±äµÃºÜ²»·½±ãÁË¡£Ò»¿ªÊ¼ÊÇÏÈ°ÑÒª°²×°µÄ³ÌÐòÒÔ¸½¼þµÄÐÎʽ·¢µ½ÓÊÏä ÔÙÔÚÊÖ»úÉÏÅäÖÃÓÊÏä ÈúóÏÂÔظ½¼þ°²×°£¬ÕâÑùËäÈ»½â¾öÁËÎÊÌâ µ«ÊÇ»¹ÊÇÓкܶ಻·½±ãµÄµØ·½¡£ ÓÚÊÇ ×Ô¼ºÏë´î½¨Ò»¸ö·þÎñÆ÷ Ö±½ÓʵÏÖÔÚÏß°²×°¡£Ç°ÌáÊÇÊÖ»úÖ§³Öwifi£¬¾ÍÊÇ˵ÐèÒªÊÖ»ú·ÃÎÊÄÚÍøµØÖ·£¬·ñÔòµÃ»° ¾Í±È½Ï ......
<%
set rs=server.createobject("adodb.recordset")
sql="select * from YONGHU where (ID is null)"
rs.open sql,conn,1,3
rs.addnew
rs("USERNAME")=request("username")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
session("username")=rs("name")
respo ......
VBSÀ³¬³öIntegerÀàÐ͵ÄÈ¡Öµ·¶Î§£¬¸ÃÀàÐ͵ÄÈ¡Öµ·¶Î§Îª-32,768 µ½ 32,767 Ö®¼äµÄÕûÊý¡£
³ö´íµÄ¸ùÔ´£º
ÔÚASPÀÓÐʱºòΪÁË·ÂÖ¹×¢È룬ËùÒÔÔÚ½ÓÊÕ²ÎÊýµÄʱºòÖ±½ÓʹÓÃCintº¯Êý°Ñ½Ó¹ýÀ´µÄ²ÎÊýת»»ÎªInteger£¨Êý×Ö£©ÀàÐÍ£¬Õâ¾Í´æÔÚÒ»¸öDZÔÚÎÊÌ⣬µ±Ò³Ãæ½ÓÊÕµÄij¸ö²ÎÊý£¨Request("xxx")£©³¬¹ýÈ¡Öµ·¶Î§Ê±£¨¿É¼òµ¥Àí½âΪ5λÊý×Ö£ ......