Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. Qsqlquery problem [Solved]
Forum Updated to NodeBB v4.3 + New Features

Qsqlquery problem [Solved]

Scheduled Pinned Locked Moved C++ Gurus
3 Posts 2 Posters 2.1k 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.
  • R Offline
    R Offline
    r.bhardwaj
    wrote on 24 Apr 2012, 01:15 last edited by
    #1

    @
    void company_db::delete_item(int itmn)
    {
    QSqlQuery dlt_itm("delete from item where item_no= ?? ");
    }
    @
    how should i compare itemn(int) to item_no(int ) attribute of item table ? Because i have to pass itmn as a string within QsqulQuery constructor ??

    1 Reply Last reply
    0
    • R Offline
      R Offline
      r.bhardwaj
      wrote on 24 Apr 2012, 02:15 last edited by
      #2

      that was very simple Ques. i got the ans
      @
      void company_db::delete_item(int itm_no)
      {
      QSqlQuery del_item;
      del_item.prepare("delete from item where item_no=(:tag)");
      del_item.bindValue(":tag",itm_no);
      del_item.exec();
      }
      @
      sry for disturbance ...

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MaPet
        wrote on 24 Apr 2012, 05:38 last edited by
        #3

        hi,
        pls set the thread to solved.
        edit the topic header and write [Solved] in front of it!
        br

        1 Reply Last reply
        0

        3/3

        24 Apr 2012, 05:38

        • Login

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