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

C#Öе÷ÓÃmysql´æ´¢¹ý³Ì³öÏÖµÄÎÊÌâ

ÔÚrootÕ˺ÅÖÐ,¿ÉÒÔÕý³£µ÷Óô洢¹ý³Ì.
»»µ½common_userÕ˺Åʱ,ͬһ´æ´¢¹ý³ÌÃûµ÷ÓóöÏÖÎÊÌâ.
×·×Ùµ÷ÊÔʱ³öÏÖ:
SELECT command denied to user 'common_user'@'localhost' for table 'proc'
ËÑË÷½â¾ö·½°¸:
MySqlConnection myconnection = new MySqlConnection("server=localhost;user id=common_user; password=***;database=testdb; Use Procedure Bodies=false;Charset=utf8;");

¹Ø¼üÓï¾äÊÇ:
Use Procedure Bodies=false;
ÔÚÍøÉÏËÑË÷±¾¾äº¬Òå:
Name : Use Procedure Bodies 
Default : true 
Description : Setting this option to false indicates that the user connecting to the database does not have the SELECT privileges for the mysql.proc (stored procedures) table. When to set to false, Connector/NET will not rely on this information being available when the procedure is called. Because Connector/NET will be unable to determine this information, you should explicitly set the types of the all the parameters before the call and the parameters should be added to the command in the exact same order as they appear in the procedure definition. This option was added in Connector/NET 5.0.4 and Connector/NET 1.0.10. 
 ´óÌåÒâ˼ÊÇ˵:
µ±ÉèÖÃʱuse procedure bodies=false£¬´æ´¢¹ý³ÌµÄ²ÎÊýÐèÒªÓë³ÌÐòÀïµÄ²ÎÊý˳ÐòÒ»ÖÂ.
»¹Î´½áÊø.
ÔÚmysql¹Ù·½.¸ø³öÁËÕâÑùÉèÖûáÓÐÒ»¸öBUG.
http://bugs.mysql.com/bug.php?id=36694
µ±È»ÕâÑù½â¾öµÄ°ì·¨»¹ÊÇÓеÄ.¿ÉÒÔʹÓÃODBCÁ¬½ÓÀ´ÊµÏÖ.
ÕâÀï²»ÔÙÏêϸ˵Ã÷.
¸½ÉÏ.NETÁ¬½ÓmysqlµÄÁ¬½Ó×Ö·û´®ÍøÖ·(±È½ÏÈ«ÃæµÄÁ¬½Ó¹éÀà):
http://www.connectionstrings.com/mysql


Ïà¹ØÎĵµ£º

JavaScriptÖзÃÎÊC#±äÁ¿¼°·½·¨

1.ÈçºÎÔÚjavascript·ÃÎÊC#±äÁ¿
·½·¨Ò»£ºÊ¹ÓÃ<%=%>
 <input id="Button3" type="button" value="jsµ÷ÓÃc#±äÁ¿" onclick="return Button3_onclick()" />
function Button3_onclick()
{        
    alert('ÎÒµÄÃû×Ö£º'+ '<%=name %>'); ......

c#ÖеÄAjaxÉÏÊÖƪ£­£­£­·Çͬ²½ÇëÇóresponseXML

ÎÒÃÇ¿ÉÒÔʹÓÃXML×÷ΪÊý¾Ý´«ËÍ¡¢¹µÍ¨µÄ¸ñʽ£¬Ajax¿Í»§¶ËÈôÒª·¢ËÍXML£¬»ù±¾ÉϾÍÊǽ«XML×÷Ϊ×Ö·û´®£¬ÔÚPOSTÇëÇóʱ·¢ËÍ£¬ÀýÈ磺
*HelloAjax.js
view plaincopy to clipboardprint?
var xmlHttp;  
function createXMLHttpRequest() {  
    if (window.XMLHttpRequest) {   ......

c#Æô¶¯Sql Server·þÎñ

³ÌÐòÆô¶¯Sql ServerÆäʵºÜ¼òµ¥
´úÂ룺
System.ServiceProcess.ServiceController   myController   =
new   System.ServiceProcess.ServiceController("MSSQL$ACCP4444"); //·þÎñÃû³Æ ÕÒÁË°ëÌì²ÅÕÒµ½£¬±¿ËÀÎÒÍêÁË¡£ÔÚ·þÎñÉÏÓÒ¼üÊôÐÔ£¬ÄÜ¿´µ½
if (myController.CanStop)
{ }
else ......

JAVAÓëC#±È½Ï

C#ÓëJAVAµÄÏà֮ͬ´¦:ÓÉÓÚC#ÓëJAVA¶¼ÊÇ»ùÓÚC++·¢Õ¹ÆðÀ´µÄ,Òò´Ë¶þÕßÖ®¼ä¾ßÓкܶàÏàËÆÖ®´¦,¾ßÌåÈçÏÂ:
¡¡¡¡1¡¢C#ºÍJAVAÓïÑԵıàÒë½á¹ûÊǶÀÁ¢ÓÚ¼ÆËã»úºÍ±à³ÌÓïÑԵģ¬¿ÉÖ´ÐÐÎļþ¿ÉÒÔÔÚÊܹÜÀíµÄÖ´ÐÐ
¡¡¡¡»·¾³ÖÐÖ´ÐУ»
¡¡¡¡2¡¢C#ºÍJAVAÓïÑÔ¶¼ÊDzÉÓÃÁË×Ô¶¯µÄÀ¬»ø»ØÊÕ»úÖÆ£»
¡¡¡¡3¡¢C#ºÍJAVAÓïÑÔ¶¼È¡ÏûÁËÖ¸Õë²Ù×÷£»
¡¡¡¡4¡¢ ......

×Ô¼ºÈçºÎÕýÈ·»ñÈ¡MYSQLµÄADOÁ¬½Ó×Ö·û´®

ÔÚ×ÀÃæÉÏн¨Ò»¸ö¿ÕµÄÎı¾Îļþmysql.txt,ÖØÃüÃûΪmysql.udl,Ë«»÷Õâ¸ömysql.udlÎļþ£¬´ò¿ª“Êý¾Ý¿âÁ¬½ÓÊôÐÔ”¶Ô»°¿ò£¬ÔÚ“Ìṩ³ÌÐò”ҳѡÔñ”Micrsoft Ole DB Provider for ODBC Drivers“£¬ µã»÷ÏÂÒ»²½£¬ÔÚ“Á¬½Ó”Ò³µÄ,"Ö¸¶¨Êý¾ÝÔ´"Ñ¡Ôñ"ʹÓÃÁ¬½Ó×Ö·û´®",µã» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ