Java д Access ÂÒÂë
Java д Access
1. ÔÚ±¾µØÖÐÎļÆËã»úÉÏ£¬·¢ÏÖдÖÐÎĵ½accessÉÏ£¬³öÏÖÂÒÂë¡£¶ÁµÄʱºòÒ²ÊÇÂÒÂë¡£
2. ¶ÁµÄʱºò£¬²»ÄܶÁstring£¬ÏÈʹÓÃbyte¶Á³öÀ´£¬È»ºóÔÙ´´½¨GBK±àÂëµÄString.
3. ²Î¿¼¶Á£¬¿ÉÄÜдµÄʱºòÒ²ÊDZàÂëת»»µÄÎÊÌ⣬ËùÒÔÒ»Ö±ÔÚ×ö±àÂëת»»£¬¿ÉÊÇÎÞÂÛÈçºÎÒ²²»ÄÜÕýȷдÈë¡£
4. ¿¼ÂÇÊÇ·ñÊÇ»·¾³ÓÐÎÊÌâ¡£´Ónetbeans6.7.1תÒƵ½ÁËeclipse3.4.2¡£ÎÊÌâÒÀ¾É¡£
5. µ½ÁíÍâµÄ»úÆ÷ÉÏÈ¥ÊÔÁË£¬ÓкÍÎÒ»úÆ÷ÏÖÏóÏàͬµÄ£¬Ò²ÓÐÕý³£µÄ¡£¼ÈÈ»ÓÐÕý³£µÄ£¬ÄÇô»¹ÊÇ¿ÉÄÜÓÐЩÉèÖá£
6. ·ÖÎöÁ˰ѹ¤³ÌתΪUTF-8»òÕßGBKʵ¼ÊûÓйØϵ£¬ÒòΪÕâÖ»ÊÇÓ°ÏìjavacµÄ±àÒë¡£Ö»ÒªÔÚjavacµÄʱºòÖ¸¶¨ÁËencoding£¬ÄÇô±àÂë¾ÍûÓйØϵÁË¡£¿ÉÊÇ£¬¹¤³ÌÖ¸¶¨ÎªGBKµÄʱºò£¬²âÊÔ³ÌÐò»¹ÊÇÕý³£ÁË£¬µ«ÊÇ£¬ÎÒÓõÄswing£¬ÆäÇ°¶ËÊÇUTF-8µÄ£¬¶øÇÒÎҵijÌÐòÐèÒª¿¼ÂÇÖÐÈÕÎÄ£¬ËùÒÔÎÒ»¹ÊÇҪʹÓÃUTF-8¡£
7. ·¢ÏÖ¿ØÖÆ̨ÉÏÖ±½ÓʹÓÃjavaÃüÁ¿ÉÒÔÕý³££¬µ«ÊÇͬÑùµÄµ½IDEÀïÃæ¾Í²»Õý³£¡£¿ØÖÆ̨µÄ±àÂëÊÇGBK¡£
8. EclipseÀïÃ棬¹¤³ÌÊÇUTF-8£¬µ«ÊÇRun configurations->common->console encodingÀïÃ棬ÓÐÒ»¸öÉèÖ㬰ÑËüÉèΪGBK¾ÍOKÁË¡£
9. NetbeansÀïÃæûÓÐÕâ¸ö£¬¿ªÊ¼¿¼ÂÇÔÚnetbeans.confÀïÃæʹÓÃ-J-Duser.languageÕâÑùµÄ²ÎÊý£¬µ«ÊÇÆäʵÎÒµÄIDE±¾À´¾ÍÊÇÖÐÎÄÁË£¬ÕâÑù×öûÓÐÒâÒå¡£
10. ×îºó·¢ÏÖÆäʵÊDZ¾µØJVMµÄ²ÎÊý£¬ÔÚnetbeansÀïÃæµÄÊôÐÔ->ÔËÐÐ->VMÑ¡ÏîÀïÉèÖÓ-Dfile.encoding=GBK”¾ÍOKÁË¡£
×ܽ᣺
¸Ð¾õ¾ÍÊÇÓÐ2¸ö±àÂëÐèÒªÎÒÃÇ¿¼ÂÇ£¬Ò»¸öÊDZàÒëʱºòµÄ£¬Ò»¸öÊÇÔËÐÐʱºòµÄ¡£±àÒëʱºòµÄÆäʵӰÏì±È½ÏС£¬Ö÷Òª¾ÍÊÇΪÁ˹ú¼Ê»¯µÄ×¢Ê͵ȵȣ»»¹ÓÐÔËÐÐʱ£¬¸Ð¾õ¾ÍÊÇODBCдAccessÐèҪʹÓÃÖÐÎĵĻ·¾³¡£
Ïà¹ØÎĵµ£º
1 ÍøÂçͨÐŵı¾ÖÊÊǽø³Ì¼äͨÐÅ¡£
2 TcpÐÒéºÍUDPÐÒé
TCP£º¿ªÏú´ó£¬ÓÃÓÚ¿É¿¿ÐÔÒªÇó¸ßµÄ³¡ºÏ¡£
TCPµÄ¹ý³ÌÏ൱ÓÚ´òµç»°µÄ¹ý³Ì
UDP£ºÓÃÔÚ¶ÔʵʱÐÔÒªÇó±È½Ï¸ßµÄ³¡ºÏ¡£
UDPµÄ¹ý³ÌÏ൱ÓÚдÐŵĹý³Ì¡£
×¢Ò⣺socketÊÇÌ×½Ó×Ö£¬ipºÍport£¨¶Ë¿ÚºÅ 0~65535¸ö¶Ë¿Ú£¬Ò»¸ö¶Ë¿ÚÖ»ÄÜÓÐÒ»¸ö½ø³Ì£©
3£¬   ......
Ê×ÏÈһЩ±»³õʼ»¯¶ÔÏóµÄ¸ÅÄ
Àà±äÁ¿£¨Àྲ̬³ÉÔ±£©£º Àà±»¼ÓÔØʱ²úÉú£»ËüµÄÉú´æÆÚÊÇÀàµÄÉú´æÆÚ£»×Ô¶¯³õʼ»¯£¨Àà±»¼ÓÔØ£©
³ÉÔ±±äÁ¿£¨Àà³ÉÔ±£©£º ÔÚʹÓÃnew´´½¨¸ÃÀàʵÀýʱ²úÉú£»ËüµÄÉú´æÆÚÓë¸ÃÀàʵÀý¶ÔÏóµÄÉú´æÆÚÏàͬ£»
×Ô¶¯³õʼ»¯£¨¹¹Ôì·½·¨±»µ÷Óã©
¾Ö²¿±äÁ¿£¨ÀàµÄ·½·¨ÖеıäÁ¿£©£º ¸Ã·½·¨±»µ÷ÓÃÊ ......
package org.bupt.test;
import java.util.ArrayList;
class MyResource {
ArrayList<Integer> arrList= new ArrayList<Integer>();
public MyResource(ArrayList<Integer> arrList) {
this.arrList = arrList;
&nbs ......
public void ExportExcel(DataTable dtData, string filename)
{
System.Web.UI.WebControls.DataGrid dgExport = null;
// µ±Ç°¶Ô»°
Sy ......