Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

C# check if mysql query modified rows

try
        {
            connection.Open();
            cmd = connection.CreateCommand();
            cmd.CommandText = "INSERT INTO BOOK(ISBN, title, author, publisher,imgPath, catalogID) VALUES ('" + isbn + "','" + title + "','" + author + "','" + publisher + "','" + localPath + "','" + catalogid + "')";
            int a= cmd.ExecuteNonQuery();
             if(a>0)
               //updated.
             else
              //Not updated.
        }
catch (Exception)
        {
           //Not updated.
        }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #mysql #query #modified #rows
ADD COMMENT
Topic
Name
3+1 =