⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

Parameter count mismatch error when upgrading from Qt 4 to Qt 5 using SQLite

  • I have a project which uses SQLite which was able to insert data into tables fine using Qt 4. Upon upgrading to Qt5, I am now seeing "Parameter count mismatch" errors whenever I try to insert data into any tables.

    I am building Qt 5.3.0 from source code and linking in the ICU and OpenSSL libraries to the build.

    It appears that the foreign key/auto increment SQLite functionality is not working or something to that affect. After searching with Google for many days, I came upon the following link which seemed to fit my situation:


    So I started over and downloaded the latest version of SQLite source, built that, created a LIB and linked it to a new build of Qt 5.3.0 using the configure switch -system-sqlite mentioned in the above listed link, also adding the SQLite LIB and header to the LIB and INCLUDES environment variables respectively.

    But this appears to have NOT fixed the problem, for I am still getting the Parameter count mismatch errors. I can post code samples, but I wanted to see if anyone has run across this and if indeed it is the result of the issues mentioned in the link above.

    At this time, I may be forced to stay with Qt 4 if I can't get this solved very soon.

    I have struggled with this error for a week now, and after trying several things, am at a loss as to what the solution is.

  • I wanted to add one more bit of information: I just attempted to manually create the SQLite plugin manually following the instructions found here:


    Things appeared to go fairly well for the most part, and the .dll and .lib files were copied to the correct qtbase\plugins\sqldrivers directory.

    However, this appears to have had little affect as I am still getting the "Parameter count mismatch" errors.

    I did NOT run configure again(per the instructions). Initially, when running configure, I used the -system-sqlite switch and then used jom to build Qt.

Log in to reply