ʵÏÖJavaÁ¬½Ómysql£¨Ô´Â룩£¡
JavaÁ¬½ÓmysqlÊý¾Ý¿â£¬´úÂë¾¹ýÔËÐÐ׼ȷÎÞÎó¡£
ÏÂÃæÎªÊµÀý---->
ÓÃÊý¾Ý¿â²Ù×ݹ¤¾ß£¨Àý£ºSQLyogEnt£©²Ù×Ýmysql½¨±í£¬»òdosϽ¨£¬ÈçÏ£º
Êý¾Ý¿âÃû£ºscutcs
±íÃû£ºstudent
±íÄÚÈÝ£º
sno char[7] NO NULL Primary Key;
sname varchar[8] NO NULL;
sex char[2] NO NULL;
bdate date NO NULL;
height decimal[10,0] ;
-------------------------------------------------------------------------
java³ÌÐò£º
import java.sql.*;
public class JDBCTest {
public static void main(String[] args){
String driver = "com.mysql.jdbc.Driver"; // Çý¶¯³ÌÐòÃû
String url = "jdbc:mysql://localhost/scutcs"; // URLÖ¸ÏòÒª·ÃÎʵÄÊý¾Ý¿âÃûscutcs
String user = "........"; // MySQLÅäÖÃʱµÄÓû§Ãû
String password = "........"; // MySQLÅäÖÃʱµÄÃÜÂë
try {
Class.forName(driver); // ¼ÓÔØÇý¶¯³ÌÐò
Connection conn = DriverManager.getConnection(url, user, password); // Á¬ÐøÊý¾Ý¿â
if(!conn.isClosed())
System.out.println("Succeeded connecting to the Database!"); //ÑéÖ¤ÊÇ·ñÁ¬½Ó³É¹¦
Statement statement = conn.createStatement(); &
Ïà¹ØÎĵµ£º
ÔÚMySQLÖУ¬¶ÔÓÚË÷ÒýµÄʹÓò¢ÊÇÒ»Ö±¶¼²ÉÓÃÕýÈ·µÄ¾ö¶¨¡£
¡¡¡¡¼òµ¥±íµÄʾÀý£º
¡¡¡¡create TABLE `r2` (
¡¡¡¡ID` int(11) DEFAULT NULL,
¡¡¡¡ID1` int(11) DEFAULT NULL,
¡¡¡¡CNAME` varchar(32) DEFAULT NULL,
¡¡¡¡KEY `ID1` (`ID1`)
¡¡¡¡) ENGINE=MyISAM DEFAULT charSET=latin1
¡¡¡¡select count(*) from r2;
¡¡ ......
MysqlµÄ°²×°Îļþ¿ÉÒÔÖ±½Óµ½ http://www.mysql.com ÏÂÔØ£¬»ñµÃfor win32µÄ.zip°ü£¬½¨ÒéÑ¡Ôñ4.0.20d°æ±¾¡£ÕâÀï²»Ïêϸ˵Ã÷¡£
¡¡¡¡ÏÂÔØ»ñµÃMysqlµÄfor win32°²×°°üºó£¬ÓÃwinzip½âѹËõ£¬Ö±½ÓÔËÐÐsetup.exe£¬ÐèҪעÒâµÄÊÇÑ¡ÔñÒ»¸ö°²×°Â·¾¶£¬µ±È»£¬°²×°Â·¾¶¿ÉÒÔÈÎÒ⣬½¨ÒéÑ¡ÔñC:\MySQLĿ¼¡£°²×°Íê³ÉºóMySQLÒ²¾ÍÍê³ÉÁË¡£Ä¬ÈϵÄÓû ......
JavaÃæÊÔÖУ¬×î³£±»ÈËÎʵ½µÄ¼¸¸öÎÊÌ⣺
1. java.util.*°üµÄUML½á¹¹Í¼¡£
2. VectorºÍArrayList¡¢LinkedListÇø±ð Hashtable ºÍ HashMapÖ®¼äµÄÇø±ð
3. String¡¢StringBuffer£¬StringBuilderÖ®¼äÇø±ð¡£
--»Ø´ð--
1.
Collection
|
|_List
| |_LinkedList
| | ......
ÉÏһƪÎÄÕÂÖнéÉÜÁËÔõÑùÀûÓÃMSNPµÇ¼MSN£¬ÔڵǼºó±ã¿ÉÈ¡ÁªÏµÈËÁË£¬ºÜ¼òµ¥¡£
²Î¿¼ÎÄÕ£º
http://msnpiki.msnfanatic.com/index.php/MSNP13:Contact_List
http://msnpiki.msnfanatic.com/index.php/MSNP15:TicketTokens
ÔڵǼºó£¬¿ÉÒԵõ½Ò»¸öcontacts.msn.comµÄticketToken£¬Õâ¿ÉÓÃÓÚºóÐøµÄÑéÖ¤
Ò»ÖÖ·½·¨ÊǼÓÈëÒ»¸öMS ......
ѧjavaÒ²½«½ü¿ìÁ½ÄêµÄʱ¼äÁË£¬Ö®Ç°Ñ§¹ýµÄ¶«Î÷×Ô¼º¸Ð¾õÓеãÄ£ºý£¬ÀíÂÛÕÆÎյIJ»ÊǺÜ͸³¹£¬ÓÐЩÎÊÌâ½â¾öµÄÒ²²»ÊǺÜÈ«Ãæ£¬Îª´ËÔÚ´óѧ±ÏҵǰϦ£¬Ïë°Ñ֪ʶºÃºÃµÄÊáÀíһϣ¬°Ñ×Ô¼º¶Ô¼¼ÊõµÄÒɵãºÍһЩÑо¿ÐĵÃдµ½csdn²©¿ÍÉÏ¡£ ......