koenp 0 Posted July 10, 2013 Share Posted July 10, 2013 Hello everybody, I wondering if somebody could check/help me with this code. I am trying to do an update query with mysql. When I use this code nothing is happening and no error If $OPT_TestResults = 1 then If Not _EzMySql_Startup() Then MsgBox(0, "Error Starting MySql", "Error: "& @error & @CR & "Error string: " & _EzMySql_ErrMsg()) Exit EndIf ; READ connection values from ini file Global $config_file = @ScriptDir & "\etc\config.ini" Global $extractfile = IniRead($config_file, "NEMO", "extractfile","") Global $User = IniRead($config_file, "NEMO", "Username","") Global $Pass = IniRead($config_file, "NEMO", "Password","") Global $Database = IniRead($config_file, "NEMO", "Database","") Global $MySQLServerName = IniRead($config_file, "NEMO", "mysqlservername","") _EzMySql_Open($MySQLServerName, $User, $Pass, $Database) $aOK = "update richiest set flgpreana='I' where flgstatu IN ('I','L');" ;_EzMySql_Exec($aOK) $number = _EzMySql_FetchNames() MsgBox(64, "Update information: ", "Total number of records that where send: " & $number, 10) EndIf Many thanks for all your help.. Kindly regards Koen Link to post Share on other sites
Solution koenp 0 Posted July 10, 2013 Author Solution Share Posted July 10, 2013 Ok found a way arround... Global $config_file = @ScriptDir & "\etc\config.ini" Global $extractfile = IniRead($config_file, "NEMO", "extractfile","") Global $sUserName = IniRead($config_file, "NEMO", "Username","") Global $sPassword = IniRead($config_file, "NEMO", "Password","") Global $sDatabase = IniRead($config_file, "NEMO", "Database","") Global $sServerName = IniRead($config_file, "NEMO", "mysqlservername","") Local $SQLCode, $TableContents = "" $SQLInstance = _MySQLConnect($sUserName,$sPassword,$sDatabase,$sServerName) $SQLCode = "update richiest set flgpreana='I' where flgstatu IN ('I','L');" $TableContents = _Query ($SQLInstance, $SQLCode) _MySQLEnd($SQLInstance) Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now