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

Javaµ÷Óô洢¹ý³Ì


 
 
 
Javaµ÷Óô洢¹ý³Ì
±¾ÎIJûÊöÁËÔõôʹÓÃDBMS´æ´¢¹ý³Ì¡£ÎÒ²ûÊöÁËʹÓô洢¹ý³ÌµÄ»ù±¾µÄºÍ¸ß¼¶ÌØÐÔ£¬±ÈÈç·µ»ØResultSet¡£±¾ÎļÙÉèÄã¶ÔDBMSºÍJDBCÒѾ­·Ç³£ÊìϤ£¬Ò²¼ÙÉèÄãÄܹ»ºÁÎÞÕÏ°­µØÔĶÁÆäËüÓïÑÔд³ÉµÄ´úÂ루¼´²»ÊÇJavaµÄÓïÑÔ£©£¬µ«ÊÇ£¬²¢²»ÒªÇóÄãÓÐÈκδ洢¹ý³ÌµÄ±à³Ì¾­Àú¡£
´æ´¢¹ý³ÌÊÇÖ¸±£´æÔÚÊý¾Ý¿â²¢ÔÚÊý¾Ý¿â¶ËÖ´ÐеijÌÐò¡£Äã¿ÉÒÔʹÓÃÌØÊâµÄÓï·¨ÔÚJavaÀàÖе÷Óô洢¹ý³Ì¡£ÔÚµ÷ÓÃʱ£¬´æ´¢¹ý³ÌµÄÃû³Æ¼°Ö¸¶¨µÄ²ÎÊýͨ¹ýJDBCÁ¬½Ó·¢Ë͸øDBMS£¬Ö´Ðд洢¹ý³Ì²¢Í¨¹ýÁ¬½Ó£¨Èç¹ûÓУ©·µ»Ø½á¹û¡£
ʹÓô洢¹ý³ÌÓµÓкÍʹÓûùÓÚEJB»òCORBAÕâÑùµÄÓ¦Ó÷þÎñÆ÷Ò»ÑùµÄºÃ´¦¡£Çø±ðÊÇ´æ´¢¹ý³Ì¿ÉÒԴӺܶàÁ÷ÐеÄDBMSÖÐÃâ·ÑʹÓ㬶øÓ¦Ó÷þÎñÆ÷´ó¶¼·Ç³£°º¹ó¡£Õâ²¢²»Ö»ÊÇÐí¿ÉÖ¤·ÑÓõÄÎÊÌ⡣ʹÓÃÓ¦Ó÷þÎñÆ÷ËùÐèÒª»¨·ÑµÄ¹ÜÀí¡¢±àд´úÂëµÄ·ÑÓã¬ÒÔ¼°¿Í»§³ÌÐòËùÔö¼ÓµÄ¸´ÔÓÐÔ£¬¶¼¿ÉÒÔͨ¹ýDBMSÖеĴ洢¹ý³ÌËùÕû¸öµØÌæ´ú¡£
Äã¿ÉÒÔʹÓÃJava£¬Python£¬Perl»òC±àд´æ´¢¹ý³Ì£¬µ«ÊÇͨ³£Ê¹ÓÃÄãµÄDBMSËùÖ¸¶¨µÄÌض¨ÓïÑÔ¡£OracleʹÓÃPL/SQL£¬PostgreSQLʹÓÃpl/pgsql£¬DB2ʹÓÃProcedural SQL¡£ÕâЩÓïÑÔ¶¼·Ç³£ÏàËÆ¡£ÔÚËüÃÇÖ®¼äÒÆÖ²´æ´¢¹ý³Ì²¢²»±ÈÔÚSunµÄEJB¹æ·¶²»Í¬ÊµÏÖ°æ±¾Ö®¼äÒÆÖ²Session BeanÀ§ÄÑ¡£²¢ÇÒ£¬´æ´¢¹ý³ÌÊÇΪǶÈëSQLËùÉè¼Æ£¬ÕâʹµÃËüÃDZÈJava»òCµÈÓïÑÔ¸ü¼ÓÓѺõط½Ê½±í´ïÊý¾Ý¿âµÄ»úÖÆ¡£ ×Ö´®1
ÒòΪ´æ´¢¹ý³ÌÔËÐÐÔÚDBMS×ÔÉí£¬Õâ¿ÉÒÔ°ïÖú¼õÉÙÓ¦ÓóÌÐòÖеĵȴýʱ¼ä¡£²»ÊÇÔÚJava´úÂëÖÐÖ´ÐÐ4¸ö»ò5¸öSQLÓï¾ä£¬¶øÖ»ÐèÒªÔÚ·þÎñÆ÷¶ËÖ´ÐÐ1¸ö´æ´¢¹ý³Ì¡£ÍøÂçÉϵÄÊý¾ÝÍù·µ´ÎÊýµÄ¼õÉÙ¿ÉÒÔÏ·¾çÐÔµØÓÅ»¯ÐÔÄÜ¡£
ʹÓô洢¹ý³Ì
¼òµ¥µÄÀϵÄJDBCͨ¹ýCallableStatementÀàÖ§³Ö´æ´¢¹ý³ÌµÄµ÷Ó᣸ÃÀàʵ¼ÊÉÏÊÇPreparedStatementµÄÒ»¸ö×ÓÀà¡£¼ÙÉèÎÒÃÇÓÐÒ»¸öpoetsÊý¾Ý¿â¡£Êý¾Ý¿âÖÐÓÐÒ»¸öÉèÖÃÊ«ÈËÊÅÊÀÄêÁäµÄ´æ´¢¹ý³Ì¡£ÏÂÃæÊǶÔÀϾƹíDylan Thomas£¨old soak Dylan Thomas£¬²»Ö¸¶¨ÊÇ·ñÓйصä¹Ê¡¢ÎÄ»¯£¬ÇëÅúÆÀÖ¸Õý¡£Òë×¢£©½øÐе÷ÓõÄÏêϸ´úÂ룺
try{
int age = 39;
String poetName = "dylan thomas";
CallableStatement proc = connection.prepareCall("{ call set_death_age(?, ?) }");
proc.setString(1, poetName);
proc.setInt(2, age);
cs.execute();
}catch (SQLException e){ // ....}  ×Ö´®7
´«¸øprepareCall·½·¨µÄ×Ö´®ÊÇ´æ´¢¹ý³Ìµ÷ÓõÄÊéд¹æ·¶¡£ËüÖ¸¶¨ÁË´æ´¢¹ý³ÌµÄÃû³Æ£¬£¿´ú±íÁËÄãÐèÒªÖ¸¶¨µÄ²ÎÊý¡£
ºÍJDBC¼¯³ÉÊÇ´æ´¢¹ý³ÌµÄÒ»¸öºÜ´óµÄ±ãÀ


Ïà¹ØÎĵµ£º

Java»ù±¾:¼¯ºÏ


Ô­ÎÄ£ºhttp://zhaosoft.javaeye.com/blog/243586
Java
»ù±¾¸ÅÄ¼¯ºÏÀࣨCollection
£© List
/Set/Map  µÄÇø±ðºÍÁªÏµ
Collection
£ºList
¡¢Set
Map£ºHashMap¡¢HashTable
ÈçºÎÔÚËüÃÇÖ®¼äÑ¡Ôñ
Ò»¡¢Array £¬ Arrays
Java
ËùÓГ´æ´¢¼°Ëæ»ú·ÃÎÊÒ»Á¬´®¶ÔÏó”µÄ×ö·¨£¬arrayÊÇ×îÓÐЧÂʵÄÒ»ÖÖ¡£
1¡¢ ......

Java ÓйØIOÀàµÄ×¢ÊÍ/˵Ã÷


InputSteam,OutputStream:¶Ô×ֽڵIJÙ×÷
Reader,Writer:¶Ô×Ö·ûµÄ²Ù×÷
InputStreamReader,OutputStreamReader:×Ö½Ú->×Ö·ûµÄת»»,×Ö·û->×Ö½ÚµÄת»»
FilterInputSteam,FilterOutputStream:¹ýÂË×Ö½ÚÊäÈëÁ÷(Êä³öÁ÷)µÄ³¬Àà
FilterReader,FilterWriter:¹ýÂË×Ö·ûÊäÈëÁ÷(Êä³öÁ÷)µÄ³¬Àà
BufferedInputStream,BufferedOutp ......

Java±à³ÌËöÊ£¨4£©——JavaÀàÖе÷ÓÃServlet

Ò»¡¢JavaÖе÷ÓÃservlet˵Ã÷£º
ÎÒÃÇÓÐʱ¿ÉÄÜÐèÒªÔÚJavaÀàÖе÷ÓÃServlet´Ó¶øʵÏÖijЩÌØÊâµÄ¹¦ÄÜ£¬ÔÚJavaAPIÖÐÌṩÁËÒ»¸öURLµÄÀ࣬ÆäÖÐopenStream( )·½·¨¿ÉÒÔ´ò¿ªURLµÄÁ¬½Ó£¬²¢·µ»ØÒ»¸öÓÃÓÚ¸ÃÁ¬½Ó¶ÁÈëµÄInputStream¡£
¶þ¡¢JavaÖе÷ÓÃservletÓ¦ÓþÙÀý£º
package com.solid.test;
import java.io.BufferedReader;
import ja ......

Ò»¸öjava³ÌÐòÔ±µÄ³É³¤Àú³Ì(ºÜÔçµÄÎÄÕÂÁË)

ºÜ¶àÍøÓÑÎÊÎÒѧϰJavaÓÐûÓÐʲô½Ý¾¶,ÎÒ˵“ÎÞËû£¬Î¨ÊÖÊì¶û”¡£µ«ÊÇÎÒÈ´ºÜÔ¸Ò⽫×Ô¼ºÑ§Ï°µÄһЩ¾­Ñéд³öÀ´£¬ÒÔ±ãºóÀ´ÕßÉÙ×ßÍä·,°ïÖú±ðÈËÊÇ×î´óµÄ¿ìÀÖÂ
ÒªÏëѧºÃJava£¬Ê×ÏÈÒªÖªµÀJavaµÄ´óÖ·ÖÀà¡£ÎÒÃÇÖªµÀ£¬×Ô´ÓSunÍƳöJavaÒÔÀ´£¬¾ÍÁ¦Í¼Ê¹Ö®ÎÞËù²»°ü£¬ËùÒÔJava·¢Õ¹µ½ÏÖÔÚ£¬°´Ó¦ÓÃÀ´·ÖÖ÷Òª·ÖΪÈý´ó¿é£ºJ2SE,J2 ......

C#ÓëC++¡¢JAVAµÄÇø±ð


#(¶Á×ö "C sharp")ÊÇ΢Èí¹«Ë¾ÔÚÈ¥ÄêÁùÔ·¢²¼µÄÒ»ÖÖеıà³ÌÓïÑÔ,²¢¶¨ÓÚÔÚ΢ÈíÖ°Òµ¿ª·¢ÕßÂÛ̳(PDC)ÉϵÇ̨ÁÁÏà.C#ÊÇ΢Èí¹«Ë¾Ñо¿Ô±Anders HejlsbergµÄ×îгɹû.C#¿´ÆðÀ´ÓëJavaÓÐמªÈ˵ÄÏàËÆ;Ëü°üÀ¨ÁËÖîÈçµ¥Ò»¼Ì³Ð,½çÃæ,ÓëJava¼¸ºõͬÑùµÄÓï·¨,ºÍ±àÒë³ÉÖмä´úÂëÔÙÔËÐеĹý³Ì.µ«ÊÇC#ÓëJavaÓÐ×ÅÃ÷ÏԵIJ»Í¬,Ëü½è¼øÁËDelphiµÄÒ»¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ