Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6840687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:52:27+00:00 2026-05-26T23:52:27+00:00

I have: remoteDB(); QSqlQuery query(SELECT * FROM products); int id = query.record().indexOf(id); int aa

  • 0

I have:

remoteDB();
QSqlQuery query("SELECT * FROM products");
int id = query.record().indexOf("id");
int aa = query.record().indexOf("license_type");
int bb = query.record().indexOf("free_trial_product_code");
int zz = query.record().indexOf("free_trial_license_number");
int xx = query.record().indexOf("free_trial_claimed_current_status");
int cc = query.record().indexOf("free_trial_correctly_validated_on");
int dd = query.record().indexOf("free_trial_start_date");
int ee = query.record().indexOf("free_trial_stop_date");
int ff = query.record().indexOf("free_trial_lasting_days");
int gg = query.record().indexOf("free_trial_issued_by");
int hh = query.record().indexOf("free_trial_license_issued_on");
int ii = query.record().indexOf("free_trial_mac_address");

int jj = query.record().indexOf("full_license_product_code");
int kk = query.record().indexOf("full_license_number");
int ll = query.record().indexOf("full_license_claimed_current_status");
int mm = query.record().indexOf("full_license_correctly_validated_on");
int nn = query.record().indexOf("full_license_licensed_to");
int oo = query.record().indexOf("full_license_email");
int pp = query.record().indexOf("full_license_telephone_number");
int qq = query.record().indexOf("full_license_issued_on");
int rr = query.record().indexOf("full_license_issued_by");
int ss = query.record().indexOf("full_license_cost");
int tt = query.record().indexOf("full_license_mac_address");

while (query.next()) {
    QString theid = query.value(id).toString();
    QString license_type = query.value(aa).toString();
    QString free_trial_product_code = query.value(bb).toString();
    QString free_trial_license_number = query.value(zz).toString();
    QString free_trial_claimed_current_status = query.value(xx).toString();
    QString free_trial_correctly_validated_on = query.value(cc).toString();
    QString free_trial_start_date = query.value(dd).toString();
    QString free_trial_stop_date = query.value(ee).toString();
    QString free_trial_lasting_days = query.value(ff).toString();
    QString free_trial_issued_by = query.value(gg).toString();
    QString free_trial_license_issued_on = query.value(hh).toString();
    QString free_trial_mac_address = query.value(ii).toString();

    QString full_license_product_code = query.value(jj).toString();
    QString full_license_number = query.value(kk).toString();
    QString full_license_claimed_current_status = query.value(ll).toString();
    QString full_license_correctly_validated_on = query.value(mm).toString();
    QString full_license_licensed_to = query.value(nn).toString();
    QString full_license_email = query.value(oo).toString();
    QString full_license_telephone_number = query.value(pp).toString();
    QString full_license_issued_on = query.value(qq).toString();
    QString full_license_issued_by = query.value(rr).toString();
    QString full_license_cost = query.value(ss).toString();
    QString full_license_mac_address = query.value(tt).toString();

    QDate date = QDate::currentDate();

    SimpleCrypt processSimpleCrypt(35363728);
    QString macaddress = getMac();
    QString separator = "_";

    QString l_type;
    QString f_trial_product_code;
    QString f_trial_license_number;
    QString f_trial_claimed_current_status;
    QString f_trial_correctly_validated_on;
    QString f_trial_start_date;
    QString f_trial_stop_date;
    QString f_trial_lasting_days;
    QString f_trial_issued_by;
    QString f_trial_license_issued_on;
    QString f_trial_mac_address;
    QString f_license_product_code;
    QString f_license_number;
    QString f_license_claimed_current_status;
    QString f_license_correctly_validated_on;
    QString f_license_licensed_to;
    QString f_license_email;
    QString f_license_telephone_number;
    QString f_license_issued_on;
    QString f_license_issued_by;
    QString f_license_cost;
    QString f_license_mac_address;


    l_type = processSimpleCrypt.encryptToString(license_type % separator % macaddress);
    f_trial_product_code = processSimpleCrypt.encryptToString(free_trial_product_code % separator % macaddress);
    f_trial_license_number = processSimpleCrypt.encryptToString(free_trial_license_number % separator % macaddress);
    f_trial_claimed_current_status = processSimpleCrypt.encryptToString(free_trial_claimed_current_status % separator % macaddress);
    f_trial_correctly_validated_on = processSimpleCrypt.encryptToString(free_trial_correctly_validated_on % separator % macaddress);
    f_trial_start_date = processSimpleCrypt.encryptToString(free_trial_start_date % separator % macaddress);
    f_trial_stop_date = processSimpleCrypt.encryptToString(free_trial_stop_date % separator % macaddress);
    f_trial_lasting_days = processSimpleCrypt.encryptToString(free_trial_lasting_days % separator % macaddress);
    f_trial_issued_by = processSimpleCrypt.encryptToString(free_trial_issued_by % separator % macaddress);
    f_trial_license_issued_on = processSimpleCrypt.encryptToString(free_trial_license_issued_on % separator % macaddress);
    f_trial_mac_address = processSimpleCrypt.encryptToString(free_trial_mac_address % separator % macaddress);

    f_license_product_code = processSimpleCrypt.encryptToString(full_license_product_code % separator % macaddress);
    f_license_number = processSimpleCrypt.encryptToString(full_license_number % separator % macaddress);
    f_license_claimed_current_status = processSimpleCrypt.encryptToString(full_license_claimed_current_status % separator % macaddress);
    f_license_correctly_validated_on = processSimpleCrypt.encryptToString(full_license_correctly_validated_on % separator % macaddress);
    f_license_licensed_to = processSimpleCrypt.encryptToString(full_license_licensed_to % separator % macaddress);
    f_license_email = processSimpleCrypt.encryptToString(full_license_email % separator % macaddress);
    f_license_telephone_number = processSimpleCrypt.encryptToString(full_license_telephone_number % separator % macaddress);
    f_license_issued_on = processSimpleCrypt.encryptToString(full_license_issued_on % separator % macaddress);
    f_license_issued_by = processSimpleCrypt.encryptToString(full_license_issued_by % separator % macaddress);
    f_license_cost = processSimpleCrypt.encryptToString(full_license_cost % separator % macaddress);
    f_license_mac_address = processSimpleCrypt.encryptToString(full_license_mac_address % separator % macaddress);

    if ((ui.validateInput->text() == full_license_number) && (full_license_claimed_current_status == 2))
    {
        QSqlQuery query;
        query.prepare("UPDATE products SET full_license_claimed_current_status=:full_license_claimed_current_status, full_license_correctly_validated_on=:full_license_correctly_validated_on,full_license_mac_address=:full_license_mac_address WHERE id=:id");
        query.bindValue(":id", theid);
        query.bindValue(":full_license_claimed_current_status", 1);
        query.bindValue(":full_license_correctly_validated_on", date);
        query.bindValue(":full_license_mac_address", macaddress);
        query.exec();
        QMessageBox msgBox;
        msgBox.setText("Success,The License Has Been Validated.");
        msgBox.exec();

    }

but i am getting

error: ambiguous overload for 'operator==' in 'full_license_claimed_current_status == 2'

when i compile.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:52:27+00:00Added an answer on May 26, 2026 at 11:52 pm

    Did you try with brackets?

    if ((ui.validateInput->text() == full_license_number) && (full_license_claimed_current_status == 2))
    

    Also what are the types of full_license_number and full_license_claimed_current_status?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a query that is executed on a remote database: select /*+ DRIVING_SITE(rd)
Have you refactored from an ActiveRecord to a DataMapper pattern? What conditions prompted the
I have an app that syncs data from a remote DB that users populate.
I am making an application in which I have to store data from remote
Have a look at this code: #include <iostream> using namespace std; int main() {
Have a website project in MVC3 C # where I retrieve information from the
I have to copy a db from a remote server to my local dev
Have just started using Google Chrome , and noticed in parts of our site,
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Have you guys had any experiences (positive or negative) by placing your source code/solution

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.