oracle ±Ê¼Ç VII Ö® ´óÊý¾ÝÁ¿ÏµķÖÒ³
ÔÚORACLE ´óÊý¾ÝÁ¿ÏµķÖÒ³½â¾ö·½·¨¡£Ò»°ãÓýØÈ¡ID ·½·¨£¬»¹ÓÐÊÇÈý²ã ǶÌ×·½·¨
Ò»ÖÖ·ÖÒ³·½·¨
<%
int i = 1;
int numPages = 14;
String pages = request.getParameter("page");
int currentPage = 1;
currentPage = (pages == null)?1:Integer.parseInt(pages);
sql = "select count(*) from tables";
ResultSet rs = DBLink.executeQuery(sql);
µÚ36Ò³ ¹² 59 Ò³
while(rs.next())
i = rs.getInt(1);
int PageCount = 1;
PageCount = (i%numPage == 0) ?(i/numPages):(i/numPages+1);
int nextPage;
int up Page;
nextPage = currentPage + 1;
if(nextPage > = PageCount)
nextPage = PageCount;
upPage = currentPage - 1;
if(upPage <=1)
upPage = 1;
rs.close();
sql="select * from tables";
rs = DBLink.executeQuery(sql);
i = 0;
while((i<numPages*(currentPage-1)) && rs.next())
{ i++;}
//Êä³öÄÚÈÝ
//Êä³ö·Ò³Á¬½Ó
ºÏ¼Æ£º<%=currentPage%>/<%=intPageCount%>Ò³
<a href="List.jsp?page=1">µÚÒ»Ò³</a>
<a href="List.jsp?page=<%=upPage%>">ÉÏÒ»Ò³</a>
<%
for(int j=1;j<PageCount;j++){
if(currentPage != j)
&
Ïà¹ØÎĵµ£º
½çÃæ: Default.aspx
½çÃæÉÏÌí¼ÓµÄ¿Ø¼þ:
Á½¸öTextBox: tEmail(ÓÃÓÚÊäÈëÓû§email),tPassword(ÓÃÓÚÊäÈë×¢²áÃÜÂë)
Ò»¸öButton: bReg
Ò»¸öLabel: lLable(ÓÃÓÚ×¢²á³É¹¦ºóÏÔʾӦ´ð)
DemoµÄ´úÂë: Default.aspx.cs
ÎÒÃÇÏÈ°ÑÊý¾ÝµÄÁ¬½Ó×Ö·û´®Ð´ÔÚWeb.configÀï:
<appSettings>
<add key="oracleconn" value= ......
µÚ¾ÅÕÂ½Ú :´¥·¢Æ÷±àÂë
´¥·¢Æ÷ÊÇ´æ´¢ÔÚÊý¾Ý¿â´æÖÐÒþʽµÄÔËÐлòÕß±»´¥·¢µÄÒ»¶Î³ÌÐò£¬µ±Ä³Ð©Ê¼þ·¢Éú¡£Í¨³£Çé¿öÏ£¬´¥·¢Æ÷ÖÐÖ§³Ö¿ÉÖ´ÐеÄÒ»¶Îpl/sql´úÂë¿é£¬µ±Ò»¸öinsert,update,»òÕßdeleteÃüÃû·¢ÉúÔÚÒ»¸ö±í»òÕßÊÓͼÉϵÄʱºò¡£ÆäÒ²Ö§³ÖϵͳºÍÊý¾Ý¿â»òÕß·½°¸Ê¼þ.oracleÊý¾Ý¿âÒ²Ö§³Ö´¥·¢Æ÷Öк¬Ó ......
¡¾ÒýÓá¿http://tangshd.blog.sohu.com/96035768.html
Oracle¶àÐмǼºÏ²¢/Á¬½Ó/¾ÛºÏ×Ö·û´®µÄ¼¸ÖÖ·½·¨
ÔõôºÏ²¢¶àÐмǼµÄ×Ö·û´®£¬Ò»Ö±ÊÇoracleÐÂÊÖϲ»¶ÎʵÄSQLÎÊÌâÖ®Ò»£¬¹ØÓÚÕâ¸öÎÊÌâµÄÌû×ÓÎÒ¿´¹ý²»ÏÂ30¸öÁË£¬ÏÖÔھͶÔÕâ¸öÎÊÌ⣬½øÐÐÒ»¸ö×ܽᡣ
ʲôÊǺϲ¢¶àÐÐ×Ö·û´®£¨Á¬½Ó×Ö·û´®£©Ä ......
1. ASCII
·µ»ØÓëÖ¸¶¨µÄ×Ö·û¶ÔÓ¦µÄÊ®½øÖÆÊý;
SQL> select ascii(A) A,ascii(a) a,ascii(0) zero,ascii( ) space from dual;
A A ZERO SPACE
--------- --------- --------- ---------
65 97 48 32
2. CHR
¸ø³öÕûÊý,·µ»Ø¶ÔÓ¦µÄ×Ö·û;
SQL> select chr(54740) zhao,chr(65) chr65 from ......