Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. QSqlError(2036, "QMYSQL3: Unable to bind value"
Forum Update on Monday, May 27th 2025

QSqlError(2036, "QMYSQL3: Unable to bind value"

Scheduled Pinned Locked Moved Chinese
2 Posts 2 Posters 2.9k Views
  • 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.
  • F Offline
    F Offline
    foxgod
    wrote on last edited by
    #1

    QSqlError(2036, "QMYSQL3: Unable to bind value", "Using unsupported buffer type: 538976308 (parameter: 1)")

    数据库打开了,成功了,没有关闭,然后我执行更新错做。
    @
    int USessionId=100;
    bool value =query.prepare("UPDATE users SET SessionId = ? WHERE UserID = userID");
    query.bindValue(0,USessionId);
    query.exec();@
    这样写总是不能更新数据,但是这样写就可以,不知道为什么??
    @
    int USessionId=100;
    bool value =query.prepare("UPDATE users SET SessionId = ? WHERE UserID = userID");
    query.bindValue(0,100);
    query.exec();@

    bindValue里面不可以给变量吗??

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jiangcaiyang
      wrote on last edited by
      #2

      是不是其它的地方导致的问题呢?我觉得这样并没有任何问题。

      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