JAVAѧϰµÄÊý¾Ý¿âÁ¬½Ó£¬Àý×ÓÒ»Ö»¡¡
³õѧJAVA£¬ºÃ²»ÈÝÒ×½â¾öÁËÕâ¸öÊý¾Ý¿âÁ¬½ÓÎÊÌ⣬Õâ¸öÖ÷ÒªÊÇÓÐÁ½¸öÎÊÌ⣬һ¸öÊÇJDBC-odbcµÄÎÊÌ⣬Èç¹ûûÓнâ¾öºÃÊý¾ÝÔ´ÅäÖ㬾ø¶ÔÊÇÓÐÈÝÒ׳öÎÊÌâµÄ£¬¼ÙÉèÄãʹÓõÄÊÇaccessµÄÊý¾Ý¿â£¬ÕâÊÇÍøÉϵÄÒ»¸öÀý×ÓµÄÓï¾ä
String dburl="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=database.mdb";
Æäʵ²¢²»ÐèÒªÄÇô³¤£¬¼ÙÉèÄãµÄÊý¾ÝÔ´ÃûΪbook,String dburl="jdbc:odbc:book";ÕâÑù¾ÍÄÜ·ÃÎÊÁË£¬ÉÏÃæµÄд·¨Ó¦¸ÃÒ²¿ÉÒÔ£¬µ«ÊDZ¾ÈËû³É¹¦£¬
¹À¼ÆÊÇÒòΪʹÓÃÁ˾ø¶Ô·¾¶µÄÔÒò¡£
ÎÒдÁ˰ëÌ죬ÒòΪÊǸö²ËÄñ£¬ËùÒÔʵÔÚÊÇÄÑÊÜ£¬×ÜËãд³ö¸öÄÜÓõÄÁ½¸öÊý¾Ý¿âµÄ²éѯµ÷Óã¬ÆäʵÔÚÕâÀïÎÒÖ»ÓÃÁËÒ»¸öÊý¾Ý¿â£¬²»¹ýÁ½¸öÒ²ÊÇÍêÈ«¿ÉÒԵġ£
ÕâÀï¾ÍÉæ¼°µ½ÁíÒ»¸öÎÊÌ⣬Êý¾ÝÀàÐ͵ÄÎÊÌ⣬ÎÒÊÇ×ÔѧµÄ£¬¶ÔÓÚÕâ¸öʵÔÚÊÇûÓоÑ飬Ȩµ±Êǽ»ÁËѧ·ÑÁË……Ô´´úÂëÈçÏ£º
import java.sql.*;
public class Sms {
String str1="";
public String myforum(){
try{
String strurl="jdbc:odbc:myforum";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection(strurl);
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery("select id from tdcode WHERE sim='13461544271'");
while(rs.next()){
str1=rs.getString(1);
}
rs.close();
stmt.close();
}catch(Exception e){
}return str1;
}
public void myforum2(String str1){
try{
String strurl="jdbc:odbc:myforum";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection(strurl);
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery("select user from tdcode WHERE id="+str1+"");
while(rs.next()){
System.out.println(rs.getString(1));
}
rs.close();
stmt.close();
}catch(Exception e){
e.printStackTrace();
}
}
public void run(){
myforum();
myforum2(str1);
}
public static void main(Strin
Ïà¹ØÎĵµ£º
¹Ø¼üÓï¾ä£º
conn.setAutoCommit(false);
if(!ok) conn.rollBack();
// after all done
conn.commit();
conn.setAutoCommit(true);
ǧÍò±ðÍü¼ÇÒª¼Óconn.commit()·ñÔò²»»áÖ´ÐÐÊÂÎñµÄ¡£
ÁíÍ⣬M ......
http://www.ibm.com/developerworks/cn/java/j-lo-uidsl/index.html
»ùÓÚ Java µÄ½çÃæ²¼¾Ö DSL µÄÉè¼ÆÓëʵÏÖ
¼¶±ð£º Öм¶
Ëï Ãù
µË »Ô
2007 Äê 9 ÔÂ 11 ÈÕ
½çÃæÉè¼ÆÓ¦¸ÃÊÇÒ»Ïî³äÂú´´ÔìÐÔ¡¢¸»ÓÐÀÖȤµÄ¹¤×÷£¬µ«ÊÇÈ´ÍùÍù±»ÈÏΪ·Ç³£µÄ¿ÝÔïºÍ·±Ëö¡£¾¿ÆäÔÒò£¬ÊÇÒòΪ½çÃæ²¼¾ÖÁìÓòËù²ÉÓõÄÃè ......
public int ExecProcAdd()
{
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedu ......
annotationʹÓÃ
2010Äê2ÔÂ11ÈÕ ÁɹúÅÖÅÖ
½ñÌì¿´annotation¹æ·¶£¬ÌؼǼÈçÏ£¬ÒÔ±ãÒÔºó²Î¿¼£¬Ò²¹©³õѧµÄÅóÓÑÃÇÒ»¸ö¿ÉÔËÐа¸Àý£¬Óв»Í×Ö®´¦£¬ÇëÖ¸ÕýÐ޸ģ»ÁíÍâ£¬ÌØ±ðÉùÃ÷£¬Èç¹û×ªÔØ»òÕßÒýÓÃÇë×¢Ã÷³ö´¦¡£
½éÉÜ
AnnotationÊÇjava5ÐÂÌí¼ÓµÄÌØÐÔ£¬ annotationÊÇÒ»ÖÖÔªÊý¾ ......
Õâ¸öÖ÷ÌâÊǹØÓÚ±àÂëµÄһЩÔÔòºÍģʽµÄ£¬ÓÃÕâЩ¿ÉÒÔ°ïÖú³ÌÐòÔ±´´½¨¸ü¼ÓÁé»îºÍ¾ßÓÐÊÊÓ¦ÐÔµÄÈí¼þÄ£¿é¡£
±ÊÕßÏÂÃæÒýÓõijÌÐòÊÇRobert´óÊåÖøÃûµÄ³ÌÐòƬ¶ÏÀ´ÖØÐÂÈÏʶһÏÂÖØ¹¹£¬ÄÇЩjava´úÂë¿´ÆðÀ´ÕýÈ·£¬µ«ÊÂʵÉϲ»ÊÇ¿´ÆðÀ´ÄÇô¼òµ¥µÄ£¬Ò»Ð¡¶Î³ÌÐòµ÷ ......