出错返回值是1
帮忙解决 _MySQL_InitLibrary()
If @error Then Exit MsgBox(0, '提示', "程序出错!",-1,$Main)
$MysqlConn = _MySQL_Init()
$connected = _MySQL_Real_Connect($MysqlConn,$Server,$User,$Pwd,$Database,$Port)
If $connected = 0 Then
$errno = _MySQL_errno($MysqlConn)
MsgBox(0,"出错:",$errno & @LF & _MySQL_error($MysqlConn))
If $errno = $CR_UNKNOWN_HOST Then MsgBox(0,"出错:","$CR_UNKNOWN_HOST" & @LF & $CR_UNKNOWN_HOST,-1,$Main)
Endif
$M_Name_Tem="AUTOIT CN"
$M_Singer_Tep="作者"
$ADDPath="地址"
$FAddSQL="insert into musicitem (m_name,m_singer,m_location)Values ('"&$M_Name_Tem&"','"&$M_Singer_Tep&"','"&$ADDPath&"')"
_MySQL_Query($MysqlConn, "set names gbk")
Local $MRQ=_MySQL_Real_Query($MysqlConn,$FAddSQL)
If $MRQ<> 0 Then
MsgBox(0,"提示","保存"&$M_Name_Tem&"出错!"&@CRLF&"出错代号:"&$MRQ,-1,$Main)
Return -1
EndIf
|