C #-about the exception in C # Updating mysql database results, please help me

Source: Internet
Author: User
My code is as follows & quot; CommonFormService. updateScore (transaction, userid, kindid, score, righttime, maxConright, maxConWrong, successRate, equispaced, random, qishu, sellid); & quot; this code is called multiple times throughout the method, the parameters are different. The updateScore method code is as follows & quot; publicstaticvoidupdat... mysqlc # Database

The code is as follows:

 CommonFormService.updateScore(transaction, userid, kindid, score, righttime, maxConright, maxConWrong, successRate, equispaced, nowConrightWrong, qishu, sellid);

This code segment is called multiple times in the entire method, but the parameters are different. The updateScore method code is as follows:

 public static void updateScore(Transaction transaction, string userid, string kindid, int score, int righttime, int maxConRight, int maxConWrong, int successRight, int epaced, int nowRightWorng, int qishu, string sellid)        {//`uId` int,`kId` int,`scre` int,`rTime` int,`mConRight` datetime,`maxWorng` int,            //`sRate` int,`epaced` int,`nowRightWorng` int,`sllID` int,`qs` int            try            {                string sql = "select InsertScore(" + userid + "," + kindid + "," + score + "," + righttime + "," + maxConRight + "," + maxConWrong + "," + successRight + "," + epaced + "," + nowRightWorng + "," + sellid + "," + qishu + ") ";                DataOperater.Sql_FillDataTabelMysql(transaction,sql);            }            catch (Exception e)            {            }        }

As shown in the code above, no special processing is performed on any data. the database can be updated as long as the data type is correct, but the updateScore method has been called for more than 30 times during execution, there are no other problems, but when the SQL = "select InsertScore (16, 37, 11, 8, 6, 1, 80, 0, 10)" in one updateScore, even though VS prompts that the operation is successful, when I query the database, the data is not updated, and the data cannot be normally updated to the database.
Select InsertScore (16, 37, 11, 8, 6, 1, 80, 0, 10) is successfully executed when it is written to another small C # program, and it is no problem to copy it to navicat for execution, what is going on? You can also find some error prompts for the problems you encountered before, but now this problem cannot be found even with an error prompt, which is quite strange. Have you ever encountered such a problem? Help ~~~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.