Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javaÔõôµ÷ÓÃmysql´´½¨µÄ±í

Õâ¸öÎÊÌâÀ§ÈÅÎҺþÃÁË£¬ÎÒÒ²²»ÖªµÀÔõôÎÊ£¬Ö»ÄÜ´óÖÂ˵һÏ£º
ÎÒÓÃMySQL´´½¨ÁËÒ»¸öÊý¾Ý¿â bookinfo±í£¬ÒªÓÃJavaµ÷ÓÃÕâÕÅ±í£¬µ«Êǵ÷Óò»³öÀ´£¬ÒªÊ²Ã´¾ä×Ó²ÅÄܵ÷ÓÃMySQL´´½¨µÄÊý¾Ý¿âÄØ¡£
Java code:
String url = "jdbc:mysql:///mytest";
String user = "root";
String password = "root";

Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
String score = null;

// 1.¼ÓÔØÇý¶¯
try {
Class.forName("com.mysql.jdbc.Driver");

// 2.½¨Á¢Á¬½Ó
conn = DriverManager.getConnection(url, user, password);
// 3.½¨Á¢Óï¾ä
stmt = conn.createStatement();
// 4.Ö´ÐÐÓï¾ä
rs = stmt.executeQuery("select * from bookinfo ");
// 5.´¦Àí½á¹û
while (rs.next()) {
score = rs.getString("..");
System.out.println(rs.getString(".."));

}


} catch (Exception e) {
e.printStackTrace();
}
// 6.ÊÍ·Å×ÊÔ´



ÓÃjdbc°¡

ÒýÓÃ
Java codeString url="jdbc:mysql:///mytest";
        String user="root";
      &nbs


Ïà¹ØÎÊ´ð£º

java±àÒëÔËÐÐc³ÌÐò£¬²¢ÏÔʾ½á¹û

ͨ¹ýjava³ÌÐò£¬ÏȱàÒëc³ÌÐò£¬Èç³öÏÖ´íÎó£¬ÌáʾC³ÌÐòÖеĴíÎ󣬱àÒë³É¹¦¾ÍÔËÐУ¬ÏÔʾCµÄÔËÐнá¹û£¬×îºÃ°ÑCµÄÔËÐÐʱ¼äºÍÄÚ´æµÈ¶¼ÏÔʾ³öÀ´

¸÷λ´ó¸ç´ó½ã°ï°ï棬СµÜ¸Ð¼¤²»¾¡£¡
ÓÃjavaµÄ½ø³ÌÀàÊÔÊÔ
ÎÒ¸øÄãת ......

c,c++Á¬½Ómysql ÕÒ²»µ½Í·²¿Îļþ£¨ÐÂÊÖ£©

±àÒëÆ÷£ºC-Free4
mysql µ¥¶À°²×°µÄ£¬ÏÖÔÚΪapache+php+mysql¿ÉÒÔʹÓá£
×î½üÔÚÁ·Ï°c£¬c++£»ÏëÓÃc£¬c++Á¬½ÓÏÂÎÒµÄmysql£¬ºÃ¶àµØ·½¶à˵mysql.hÕÒ²»µ½¡£¶øÇÒÎÒmysqlûÓÐËùνµÄincludeÎļþ¼Ð°¡¡£
Íü¸ßÊÖÖ¸µãÒ»¶ ......

jspѧϰǰҪÁ˽âÄÇЩ֪ʶ£¿£¨Ñ§ÁËjavaÁË£©

jspѧϰǰҪÁ˽âÄÇЩ֪ʶ£¿Ñ§ÁËjavaÁË¡£²»ÖªµÀ»¹ÒªÑ§Ï°Ð©Ê²Ã´ÖªÊ¶²Å¿ÉÒԺܺõÄѧϰjsp
HTML¡¢JavaScript

Ö±½Óѧ¾Í¿ÉÒÔÁË£¬Óöµ½²»»á¾ÍÏÖѧ¾ÍÐС£

Html  css servlet

È¥Á˽âä¯ÀÀÆ÷Óëweb·þÎñÆ÷µÄ¼òµ¥½» ......

javaÖеÄÒÉÎÊ

1  public class BirthDate {
2 private int day;
3 private int month;
4 private int year;
5
6 public BirthDate (){}
7
8 public BirthDate (int d,int m,int y){
9 day = d;
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ