javaÁ¬½ÓÊý¾Ý¿âÎÊÌ⣬¼±¼± - Java / Java SE
ΪʲôÁ¬½Ó²»³É¹¦ÄØ£¿ÄĸöÄܽâ´ðÏÂ
ÎÒÁ¬½ÓÊý¾Ý¿âsql server 2005
ÏÂÁËjdbcÇý¶¯ÅäÖÃÁ˺ܶà´Î¶¼²»³É¹¦
ÓÐÄĸöÅóÓÑÖªµÀÔõÑùÅäÖÃÂð£¿
Õâ¸öÏÂÃæ´úÂëÁ¬½Ó³öÏÖµÄÎÊÌâ
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at test.main(test.java:12)
Java code:
import java.sql.*;
public class test
{
public static void main(String[] args)
{
Connection con=null;
Statement stmt=null;
ResultSet rs=null;
try
{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
con=DriverManager.getConnection("jdbc:sqlserver://localhost:1433;integratedSecurity=true;DatabaseName=JSPTest","sa","java");
stmt = con.createStatement();
rs = stmt.executeQuery("select userName,passWord,email from regist");
while(rs.next())
{
String strUserName = rs.getString(1);
String strPassWord = rs.getString(2);
System.out.println(strUserName+'\t'+strPassWord+'\t');
}
if(rs!=null)
rs.close();
if(stmt!=null)
Ïà¹ØÎÊ´ð£º
Ò»¸öJSPÒ³Ãæ½ÓÊÕÆäËûÒ³ÃæÌá½»¹ýÀ´µÄFORM±íµ¥£¬µ«ÊÇÒªÇóÖ»½ÓÊÕµ±Ç°Õ¾µã¼°Æä×ÓÕ¾µãÌá½»¹ýÀ´µÄFORM±íµ¥£¬ÆäËûÕ¾µãÌá½»¹ýÀ´µÄ±íµ¥²»½ÓÊÕ£¬Õâ¸öÔõôÉèÖã¿
ÓùýÂËÆ÷
filter
½«µ±Ç°Õ¾µã¼°Æä×ÓÕ¾µã·ÅÒ»¸öĿ¼
È» ......
¸÷·´óÏÀ¸ø¸ö˼·£¬²»ÊÇÔÚÏßµÄÄÇÖÖ£¬¾ÍÊÇÒ»¸ö×öÆÕͨµÄÓ¦ÓóÌÐò¡£
´Ê¿âÔõôÉú³ÉÄØ£¿
²»»á¡£
ÒýÓÃ
´Ê¿âÔõôÉú³ÉÄØ£¿
ÕÒ±¾×Öµä
ÒýÓÃ
´Ê¿âÔõôÉú³ÉÄØ£¿
Êý¾Ý¿â ºÇºÇ
ÓÃmap ¼üÖµ¶ÔÓ¦
Èç¹ûÓÃÊý¾Ý¿ ......
ΪʲôHTMLÒÔ¼°Ò»Ð©ÆäËü±êÇ©»áÏÔʾһЩÌض¨±íÏÖÐÎʽÄØ£¿ÈçHTMLÖеĻ»ÐбêÇ©<BR/>ÔڵײãÊÇÔõÑùʵÏÖµÄÄØ£¿ÏÖʵµÄÔÀíÊÇʲôÄØ
È¥W3C¹Ù·½ÍøÕ¾ÉÏ£¬¿´¿´°É£¡ÎÒÏëÒ»¿´Äã¾ÍÃ÷°×ÁË
ÎҲºͱàÒëÔÀíÓйأ¬ä¯ÀÀÆ÷Àï¿É ......
È磺 @superwaring("unchecked");
Õâ¸öÀïÃ涼¿ÉÒÔÈ¡ÄÄЩֵ°¡£¬»¹ÓÐÀàËÆµÄ @superwaring±êÇ©ÓÐÄÄЩ°¡
ûÓùý¡£¡£
¿´jeeµÄapi
javax.persistenceÀï
@superwaring("unchecked");Ö»ÊǺöÂÔ ......
´ó¼ÒºÃ£¬ÎÒÏÖÔÚÓÐÒ»¸öÓÃaspдµÄÁÄÌìÊÒ£¬ÏÖÔÚµÄÏëÌí¼ÓÒ»¸ö¹¦ÄÜ£¬¾ÍÊǵ±ÓÐÈËÉÏÏßµÄʱºò£¬·¢³öÌáʾ£¬±ÈÈçÉùÒôÏìһϣ¬ÏÖÔÚÏëÓÃjavaʵÏÖÕâ¸ö¹¦ÄÜ£¬ÇëÎÊ´ó¼ÒÔõôʵÏÖ£¿
ллÁË£¬ÎÒ»á¼Ó·ÖµÄ
aspºÍjavaÕûºÏµ½Ò»ÆðÈ¥£¿ºÎ±Ø ......