Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Parameter count mismatch error when upgrading from Qt 4 to Qt 5 using SQLite
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mark_in_gr
    wrote on last edited by
    #1

    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:

    http://blog.forwardbias.in/2011/08/when-sqlite-queries-fail-for-no-reason.html

    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.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mark_in_gr
      wrote on last edited by
      #2

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

      http://qt.apidoc.info/5.2.0/qtsql/sql-driver.html#qsqlite

      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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved