title: QSqlQuery row affected result
body: <pre><code>SHA256 sha256;
  std::string s = sha256(pass.toStdString());
  
  QString myquery = "declare @identifier nvarchar(100) = NEWID()\
          declare @user_name nvarchar(50) = '"+user+"'\
          declare @pass_word nvarchar(100) = '"+QString::fromStdString(s)+"'\
          declare @hint nvarchar(50) = '"+hint+"'\
          if NOT exists(select * from user_table where (userid=@identifier or username = @user_name))\
          insert into user_table (username,password,password_salt,userid) values(@user_name,@pass_word,@hint,@identifier)";
  qDebug()&lt;&lt;myquery;
  openSqlConnection();
  QSqlQuery q3;
  q3.exec(myquery);
  </code></pre>
  
  <p>After executing this query, I should see result which will be <code>(1 row(s) affected)</code> if executed successfully.</p>
  
  <p>If <code>username</code> already exists in the database, the result will be</p>
  
  <blockquote>
    <p>Command(s) completed successfully.</p>
  </blockquote>
  
  <p>To see the result from the <code>select</code> I use <code>q3.next()</code>.</p>
  
  <p>How do I know that my query has been executed successfully?</p>