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

Java ´ÓExcelÎļþ»ñÈ¡µÄÊý¾Ý ÈçºÎ²åÈëµ½mysqlÖÐÈ¥

Java ´ÓExcelÎļþ»ñÈ¡µÄÊý¾Ý  ÈçºÎ²åÈëµ½mysqlÖÐÈ¥

1.ExcelÎļþ»ñÈ¡µ½µÄÊý¾Ý ÀýÈçÏÂÃæµÄ£º
ÐòºÅ    Óû§ÐÕÃû   ÁªÏµµç»° µØÖ·         ²úÆ·ÐͺŠ 
1 ÕÅÈý 11111111       ¸»Àö7-1-201 5        YT
2 ÀîËÄ 22222222       ÃÀµØÍå¾°7-2-301      YF

2.ÈçºÎ½«ÕâЩÊý¾Ý·â×°³ÉList °ÑËü×÷Ϊwrite·½·¨µÄ²ÎÊý´«½ø

public int write(List list) throws SQLException {
  Connection con = null;
  PreparedStatement ps = null;
  int i = 0;
  try {
//1 ¼ÓÔØclass
Class.forName(CConnectInfo.driver);
//2 ´´½¨Á¬½Ó
con = DriverManager.getConnection(CConnectInfo.url,CConnectInfo.username,CConnectInfo.password);

String sql = "insert into consumer(name,cellPhone1,address,productId) values(?,?,?,?,?,?,?)";//?ºÅÊÇռλ·û£¬Ï£Íû¶¯Ì¬¸³ÖµµÄ;
//3 ´´½¨preparedStatement¶ÔÏó
ps = con.prepareStatement(sql);
//4 Ϊps¸³Öµ
                            ÕâÀï¸ÃÈçºÎд£¿
i = ps.executeUpdate();

}catch(ClassNotFoundException e) {
e.printStackTrace();
}finally {
if(con != null)
con.close();
  con = null;
if(ps != null)
ps.close();


Ïà¹ØÎÊ´ð£º

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

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

ÔõôÓÃJavaʵÏÖ¶¨Ê±Ö´ÐÐij³ÌÐò - Java / Java SE

ÎÒÏëÓÃJavaдһ¸ö³ÌÐò£¬¾ÍÊÇÎÒÏëÔÚÔËÐдúÂëºó£¬ÔÚÖ¸¶¨µÄʱ¼ä´ò¿ªÄ³³ÌÐò£¬ÀýÈçÎÒÔËÐдúÂëºó£¬½²ÔÚ12£º00´ò¿ª"D:\Program Files\Tencent\QQ2009\Bin\QQ.exe"Õâ¸ö³ÌÐò£¬Çó¸ßÈËÖ¸µã¡£»¹ÓпÉÄܵϰÔÚÖ¸¶¨µÄʱ¼ä ......

javaÈÕÆÚ´¦Àí - Java / Java SE

µ±ÖªµÀÒ»¸öÈÕÆÚ£¬ÈçºÎ°ÑÕâ¸öÈÕÆÚËùÔÚÑ®µÄǰºóÁ½¸öÈÕÆÚÈ¡³ö
±ÈÈçÊäÈë20090905£¬¾ÍÊäÈë20090901 20090910
Êä³ö20090901 20090910

È¡µÃÌìÊýºó×÷Ò»ÏÂÅжÏÔÙ°ÑÕâ¸ö·½·¨ÓÃÏÂvoid set(int field, int value)  
......

MYSQLÓëSmartyµÄÓ¦ÓÃ

ÔÚÈýÊ®½²Óöµ½ÕâÑùÒ»¸öÎÊÌâ¾ÍÊÇÔËÐдúÂëʱ³öÏÖ´íÎó Fatal error: Call to undefined method mysql::fetch_array() in D:\WWW\news\index.php on line 12
£¬ÎÒ°Ñmysql::fetch_array() ¸Ä³Émysql::fetch_row() ÓÖ³öÏÖF ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ