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

C#Á¬½ÓMySQLÊý¾Ý¿â·½·¨

C#Á¬½ÓMySQLÊý¾Ý¿â·½·¨
1¡¢ÓÃMySQLDriverCSÁ¬½ÓMySQLÊý¾Ý¿âÏÈÏÂÔغͰ²×°MySQLDriverCS£¬µØÖ·£º
http://sourceforge.net/projects/mysqldrivercs
ÔÚ°²×°Îļþ¼ÐÏÂÃæÕÒµ½MySQLDriver.dll£¬È»ºó½«MySQLDriver.dllÌí¼ÓÒýÓõ½ÏîÄ¿ÖÐ
×¢£ºÎÒÏÂÔصÄÊÇ°æ±¾ÊÇ MySQLDriverCS-n-EasyQueryTools-4.0.1-DotNet2.0.exe
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Odbc;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MySQLDriverCS;
namespace mysql
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            MySQLConnection conn = null;
            conn = new MySQLConnection(new MySQLConnectionString("localhost", "inv", "root", "831025").AsString);
            conn.Open();
            MySQLCommand commn = new MySQLCommand("set names gb2312", conn);
            commn.ExecuteNonQuery();
            string sql = "select * from exchange ";
            MySQLDataAdapter mda = new MySQLDataAdapter(sql, conn);
            DataSet ds = new DataSet();
            mda.Fill(ds, "table1");


Ïà¹ØÎĵµ£º

MySQLÊý¾ÝÀàÐÍÓ뽨¿â²ßÂÔµÄÏêϸ½âÎö

´ËÎÄÕÂÖ÷ÒªÃèÊöµÄÊÇMySQLÊý¾ÝÀàÐÍÓ뽨¿â²ßÂÔµÄÏêϸ½âÎö£¬ÎÒÃÇ´ó¼Ò¶¼ÖªµÀÎÞÂÛÊÇÔÚ²»ÊշѵÄÊý¾Ý¿â¿Õ¼ä»òÕßÊÇ´óÐ͵ĵç×ÓÉÌÎñÍøÕ¾£¬ÆäºÏÀíµÄÉè¼Æ±í½á¹¹¡¢³ä·ÖÀûÓÿռäÊÇÊ®·Ö±ØÒªµÄ¡£
¡¡¡¡Õâ¾ÍÒªÇóÎÒÃǶÔÊý¾Ý¿âϵͳµÄ³£ÓÃMySQLÊý¾ÝÀàÐÍÓгä·ÖµÄÈÏʶ¡£ÏÂÃæÎҾͽ«ÎÒµÄÒ»µãÐĵÃд³öÀ´¸ú´ó¼Ò·ÖÏí¡£
¡¡¡¡Ò»¡¢MySQLÊý¾ÝÀàÐÍÖ®Êý×ÖÀàÐ ......

ÔõÑùÔÚvisual studio.NET ÈÃC,C++,C#´úÂë×Ô¶¯ÅÅÆë

ÎÊÌâÃèÊö£º
C#³ÌÐò,ÀïÃæcopyÁËÐí¶àÔ­À´µÄ´úÂë,ËùÒԲβÆëµÄ,ºÜÄѶÁ,ÈçºÎ²ÅÄÜÈôúÂë×Ô¶¯ÅÅÆë,¾ÍÏóVS   6.0ÖпÉÒÔʹÓÿì½Ý¼ü,·Ç³£·½±ã.
½â´ð£º
ctrl+a,ÏÈÈ«Ñ¡   
ctrl+k,ctrl+f,×Ô¶¯ÅÅÁÐ
»òÕß
ctrl+a,ÏÈÈ«Ñ¡
alt+F8 ×Ô¶¯ÅÅÁÐ ......

ASP.NET C# ÑéÖ¤Âë Ö§³ÖÖÐÎÄ Ôëµã ÍäÇú

/// <summary>
        /// ¸ù¾ÝÖ¸¶¨²ÎÊý·µ»ØBitMap¶ÔÏó
        /// ÒýÓÃÈçÏ£º
        /// using System.Drawing;
        /// µ÷ÓÃÀý×ÓÈçÏ£º
   ......

ÈçºÎÌá¸ßmysql load data infileµÄËÙ¶È


°æȨÉùÃ÷
£º×ªÔØʱÇëÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂԭʼ³ö´¦ºÍ×÷ÕßÐÅÏ¢¼°±¾ÉùÃ÷
http://bbayou.blogbus.com/logs/37045617.html
²âÊÔÊý¾Ý2.5G£¬¹²ÓÐÊý¾Ý9427567Ìõ¡£ÓõÄmysqlµÄlarge·þÎñÆ÷µÄÅäÖá£
load
Ò»´ÎÐèÒª´ó¸Å10·ÖÖÓ×óÓÒ¡£
½¨µÄ±íÓõÄÊÇMYISAM£¬µ÷ÕûÁ˼¸¸ösessionµÄ²ÎÊýÖµ
SET

SESSION

BULK_INSERT_BUFFER_S ......

cmdÃüÁîÌáʾÐÐÁ¬½ÓmysqlÂÒÂëµÄ½â¾ö

1¡¢MySQLÊÇÓÐһЩ»·¾³±äÁ¿¿ÉÒÔÉèÖã¬
¿ÉÊäÈ룺show variables;¿É²é¿´µ±Ç°µÄ»·¾³±äÁ¿ÉèÖã»
2¡¢ÕâЩ±äÁ¿µ±ÖÐÓÐÒ»²¿·ÖÓë×Ö·ûÏà¹ØµÄÉèÖã¬
¿ÉÊäÈ룺show variables like ´character%´;²é¿´£»
3¡¢ÆäÖÐcharacter_set_results¾ö¶¨·µ»Ø½á¹ûµÄ±àÂ룬
windowsÏÂÉèΪgb2312¼´¿ÉÕý³£ÏÔʾÖÐÎÄ£»
ÉèÖ÷½·¨£ºset charac ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ