SQL serverÊý¾Ý¼¯³ö´íÇóÖú
Á½ÖÖ´íÎó£º
1.Èç¹ûÎÒÕâÑùÉêÃ÷£ºResultSet rs;´íÎóÌáʾÈçÏ£º
An error occurred at line: 51 in the jsp file: /index.jsp
The local variable rs may not have been initialized
48: {
49: out.println("Òì³£!");
50: }
51: while(rs.next())
52: {
53: %>
54: <td width="11%" height="20" align="center"> <div align="center">
2.Èç¹ûÎÒÕâÑùÉêÃ÷£ºResultSet rs=null;´íÎóÌáʾÈçÏ£º
org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 51
48: {
49: out.println("Òì³£!");
50: }
51: while(rs.next())
52: {
53: %>
54: <td width="11%" height="20" align="center"> <div align="center">
³öÏÖÕâÖÖÇé¿öÔõô½â¾ö£¿Çó¸ßÊÖ°ï棡±È½Ï¼±,лл~~£¡£¡£¡£¡´úÂëËäÈ»³¤£¬µ«ÊǺܶ඼ûÓбØÒª¿´£¬Ï£ÍûµÃµ½°ïÖú¡£¡£¡£¡£¡£
ÎÊÌâ²¹³ä£¨rs³õʼ»¯ÔÚÏÂÃæ´úÂëÖкìÉ«±êÇ©´¦Ã÷Ã÷³õʼ»¯ÁË
Ïà¹ØÎÊ´ð£º
ÏÖÔÚÓÐÁ½¸öÒì¹¹µÄsql serverÊý¾Ý¿â,ÎÒÏ뽫µÚÒ»¸ö±íÖеÄÊý¾Ýµ¼Èëµ½µÚ¶þ¸ö±íÖÐ,×Ô¼ºÖ¸¶¨µ¼ÈëÊý¾ÝµÄ×Ö¶Î,ÈçºÎµ¼ÈëÊý¾ÝÄØ,´ó¼ÒÌÖÂÛÒ»ÏÂ?
dts¹¤¾ß
µ¼Èëµ¼³ö¹¤¾ß.
DD
¹þ¹þ£¬¹À¼ÆÕâλÊǵØQIOU¶¼Êܲ»Á˵Ä
Ö±½ÓÐ ......
ÎÒÏÖÔÚÓÐ2¸ö±íTable1£¬Table2¡£¶ÔÓ¦µÄ×ֶΡ¢Êý¾ÝÈçÏ£º
Table1£ºprimary key(a1)
a1(char) a2(int)
a 10
b & ......
±íA
¿¨ºÅ ʱ¼ä
1 null
2 null
3 & ......
ÈçÌ⣺select name from table1
µÃµ½½á¹û£ºname
СÍõ
СÕÔ
СÀî
......
ÓÐÒ»¸ö±í½á¹¹ÈçÏ£º
ÎïÆ·±àÂë ʹÓôÎÊý Ãû³Æ ÊôÐÔ1£¬ÊôÐÔ2.¡£¡£¡£¡£¡£¡£
ÆäÖУ¬Ç°Á½ÏîΪÖ÷¼ü£¨ÎïÆ·±àÂë ʹÓôÎÊý£©£¬´ÎÊý×î¶àΪ5
ÏÖÔÚÎÒÏë°Ñ ͬһÖÖÎïÆ·µÄ²»Í¬´ÎÊýµÄÊôÐ ......