Results 1 to 7 of 7

Thread: how do i pass an parameter to setFilter() through a variable

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Posts
    9
    Qt products
    Qt3
    Platforms
    Unix/X11

    Angry how do i pass an parameter to setFilter() through a variable

    hai

    I am using QDataTable to display the data from the database with three fields which has the following data types.
    Channel Name as char, Chval as int and GenDateTime as datetime in mysql, i have set the database connection and the data has been displayed in the qdatatable, but i want to set the setfilter() so the i am can apply the where option.

    If i pass the the value directly in the is format setFilter("ChName=\"1AE01A\"") it works fine but how do i pass through some variable.
    Say QString Vname="1AE01A"
    setFilter("ChName =......?......");

    But not with QString i need to give on GenDateTime column where i am interested in retreiveing the records which 3 days less than current date and time. And also how do i get 3 days back date time from current date time.

    Can anybody help me .......... Which will be very help ful..

    Thank you
    Babu
    Last edited by babusunlux; 3rd April 2006 at 12:20.

Similar Threads

  1. Pass variable from a form to another form
    By dark1988 in forum Qt Programming
    Replies: 5
    Last Post: 8th February 2011, 18:19
  2. nmake error during .pro compiling
    By mattia in forum Installation and Deployment
    Replies: 5
    Last Post: 18th June 2008, 10:15
  3. pass "this" as parameter
    By incapacitant in forum Newbie
    Replies: 17
    Last Post: 25th May 2006, 09:41

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.