c#ºÍmysql´îÅäЧÂÊ
Ò»°ãC#ºÍMS Sql Server´îÅ䣬²»ÖªµÀºÍMySqlÈçºÎ£¬ÊÇ·ñЧÂÊÉÏÓÐËù½µµÍ£¿Âé·³ÓùýÕâÖÖ´îÅäµÄ½²Ï£¬¶àл
΢ÈíÒ»ÏòÊÇÒÔ¢¶ÏΪ·¢Õ¹·½Ïò,ÎÒÃÇÔÚÒÔÇ°ÖªµÀ,JavaÔÚWindowsÉϵÄÔËÐÐÐÔÄÜÔ¶Ô¶²îÓÚLinuxµÈOS,ÓÐʱÔÚWindowsÉÏ»¹»á³öÏÖһЩÕâÑù»òÄÇÑùµÄÎÊÌâ.....
ÏÖÔÚÓÐЩ´óµÄÈí¼þ²úÆ·¶¼Ç¿µ÷ÔÚLunixµÈÆäËü²Ù×÷ϵͳÉϵÄÐÔÄÜÓëÎȶ¨,ÈçOracle,Sybase,DB2....Ì«¶àµÄ²úÆ·Ö§³ÖLinuxÁË.......ËäÈ»ÓеIJúÆ·Ò²·¢ÏÖÁËWindows°æ,µ«ÊÇÐí¶àÆóÒµÒ²²»¸ÒÔÚWindowsÉÏÅÜËüÃǵĺËÐÄÒµÎñ.......
ÀëÁË΢ÈíµÄÕóÓª,ÍâÃæµÄÊÀ½çºÜ¾«²Ê............
ͨ¹ýÒÔÉÏ˵Ã÷...Èç¹ûÄãÓÃ΢ÈíµÄ²úÆ·,ÈçÂ¥Ö÷µÄC#+.NET,SQL Serverµ±È»ÊÇ×îºÃµÄ...ΪÁ˲úÉú²»±ØÒªµÄÂé·³ÀË·ÑÄãµÄÇà´º...Äã×îºÃ¾ÍÓÃ΢ÈíµÄ²úÆ·.....Èç¹ûÄãϲ»¶Mysql¾ÍÓÃLinux....
Õâ¸öÊÀ½çÊǾºÕùµÄÊÀ½ç...²»Í¬µÄ²úÆ·¼ä,²»Í¬µÄƽ̨¼ä,²»Í¬µÄ¹«Ë¾¼ä,²»Í¬µÄÖÖ×å¼ä....ºÇºÇ...
¾ºÕù¾Í»áÒªÊÖ¶Î...JavaÔÚWindowsÉϾÍÓÃÁËÊÖ¶Î...ÏÖÔÚOracleµÄ·ÃÎÊ×éÒÔºó΢ÈíÒ²²»ÌṩÁËÓÉOracleÌṩODAC
...Ҳ˵²»ÇåÄÇЩ΢ÈíÓÖÔÚ.NetÉÏʹÊÖ¶Î,ÈÃÄã·ÃÎÊOracleÆðÂýÕâÊÇÓпÉÄܵÄ...
Â¥Ö÷Èý˼
c# ¶ÔsqlºÍoracleµÄÖ§³Ö¶¼¿ÉÒÔ£¬Á˽âÏÂado.netµÄ½á¹¹
C#ÅäoracleûÓÐÓ°Ïì ÅäMYSQLÓ¦¸ÃÒ²Ò»Ñù
C#¿ÉÒÔÓÃ΢ÈíÌṩµÄ·½·¨À´Á¬MySQL,Ò²¿ÉʹÓÃÒ»¸ö¿ªÔ´µÄMySQLDriverCSÀ´Á¬MySQL
ÍøÉϺܶàÎÄÕÂ˵ÓÃMySQLDriverCS»á¸ü¿ì¡£¡£¡£
Ò»°ãµÄû¶àÉÙÓ°Ï죬Æäʵ¶¼²î²»¶à
¶þ¥˵µÄ¶Ô ÒªÊÇϸ½ÚµÄ»°»¹ÊÇÓеıϾ¹²»ÊÇÒ»¸ö¹«Ë¾ ¿Ï¶¨»áÓвî¾àÁË
ÒªÊǽáºÏµÄ»°..¿Ï¶¨²»ÈçMSSQL
µ«ÊÇÒ²ÄÜÓÃ..c#+mysqlÍêÈ«¿ÉÒÔ
ËäÈ»SQL ServerÔÚ΢Èí¿ª·¢¹¤¾ßÉϵÄÖ§³Ö¸ü·á¸»£¬µ«ÊÇÖ»ÒªÄãÐèÒªÓõŦÄܶ
Ïà¹ØÎÊ´ð£º
C#ÈçºÎÅжÏÁ¬½Ósql serverÊý¾Ý¿â³É¹¦£¿
try
{
connection.connect()
return true;
}
catch()
{
return false;
}
Â¥Ö÷ºÜ׿±£¬¿ªÁ˼¸ÌùÁË¡£
ÒýÓÃ
try
{
connection.connect( ......
Ò»¸öÐÐÒµÍøÕ¾£¬ÒªÊµÏֵŦÄÜÒªÇóΪ£º
Ò»ËÑË÷±íµ¥¿ÉÑ¡ËÑË÷ ²úÆ·/×ÊѶ/É̼ң¬ËÑË÷ʱϣÍûÏÈËѱêÌâºóÈ«ÎÄ£¬µ±Ç°µÄÊý¾ÝÁ¿¹À¼Æ3Íò¶à£¬¶¨Î»ÆÚÍûÔÚ°ÙÍò¼¶Ò²¿ÉÓá£
Êý¾ÝÀàÐÍΪinnodb£¬µ±Ç°µÄ·½·¨ÊǶԹؼü´Ê½øÐÐ ......
ÎÒÊÇÓÃmysql×Ô´øµÄC API
if(mysql_real_connect(&mysql,"125.0.0.108","root","root","home",3306,NULL,0))
{
AfxMessageBox("Êý¾Ý¿âÁ¬½Óʧ°Ü") ......
MYSQL ½ØÈ¡Ò»¸öÊý¾Ý±íÖÐ,ijһ¸ö×Ö¶Î(fulltext) µÄÇ°Èý°Ù¸ö×Ö·û,·Åµ½¸Ã±íÏÂÁíÒ»¸ö×Ö¶Î(introtxt)Àï.
ÇóʵÏÖÕâ¸öЧ¹ûµÄÃüÁî
SQL code:
update ±í set introtxt=left(`fulltext`,300);
¶¥£¬Ñ§Ï°
SQL code: ......
SELECT a.tguildname ,SUM(a.ct) + if (SUM(b.ct) IS NULL ,0,SUM(b.ct)) from (
SELECT tg.tguildname,c.cid, (
cf.fbb + cf.fgjbb + cf.fjybb + cf.fqb + cf.fgjqb + cf.fjyqb + cf.fqib + cf. ......