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

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 =


Ïà¹ØÎĵµ£º

ASP.NET C# URL¼ÓÃܽâÃÜ

ÐèÒªÒýÓõÄÀàÃû¿Õ¼ä
using System.Security.Cryptography;
using System.IO;
using System.text;
 
        /// <summary>
        /// ¼ÓÃÜ
        // ......

MYSQL °²×°È«½â


Red Hat Linux ϰ²×°mysql°æ±¾³åÍ»ÎÊÌâ½â¾ö
¸ÕÅöµ½Ò»¸öÎÊÌ⣬ÓÉÓÚÔÚʹÓõÄlinux·þÎñÆ÷ÉÏÒѾ­°²×°ÁËÒ»¸ö½ÏµÍ°æ±¾µÄMySql server£¬Ê¹ÓÃrpm°ü½øÐа²×°Ê±£¬Ìáʾ°æ±¾³åÍ»£¬°²×°²»ÄܼÌÐø½øÐС£
ÓÉÓھɵÄÊý¾Ý²»ÏëÒªÁË£¬½â¾ö°ì·¨ÊÇÕâÑùµÄ£º
[b]1¡¢ÏȰÑϵͳÀï°²×°µÄËùÓÐmysqlÕÒ³öÀ´[/b]
#rpm -qa | grep -i mysql ÔËÐдËÃüÁîº ......

Mysql£¬SqlServer£¬OracleÖ÷¼ü×Ô¶¯Ôö³¤µÄÉèÖÃ


Mysql£¬SqlServer£¬OracleÖ÷¼ü×Ô¶¯Ôö³¤µÄÉèÖÃ
1¡¢°ÑÖ÷¼ü¶¨ÒåΪ×Ô¶¯Ôö³¤±êʶ·ûÀàÐÍ
ÔÚmysqlÖУ¬Èç¹û°Ñ±íµÄÖ÷¼üÉèΪauto_incrementÀàÐÍ£¬Êý¾Ý¿â¾Í»á×Ô¶¯ÎªÖ÷¼ü¸³Öµ¡£ÀýÈ磺
create table customers(id int auto_increment primary key not null, name varchar(15));
insert into customers(name) values("name1"),("nam ......

½â¾öMySQLÂÒÂë

mysql±àÂëӦעÒâµÄ»·½Ú£º
 
Õ⼸¸ö»·½Ú±àÂ붼ͳһÁË£¬Ò»°ã²»»á³öÏÖÂÒÂë¡£BTW:
¿ÉÒÔÓÃSET NAMES xÁÙʱÉèÖÃmysql±àÂ룺
Ï൱ÓÚ
SET character_set_client = x;
SET character_set_results = x;
SET character_set_connection = x;
È磺
mysql_query("SET NAMES 'gb2312'") or die("Query failed : " . mysql_er ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ