Results 1 to 5 of 5

Thread: Table Creation Problem.

  1. #1
    Join Date
    Feb 2010
    Posts
    23
    Qt products
    Qt3 Qt4
    Platforms
    Windows Symbian S60

    Question Table Creation Problem.

    Dear All,

    i created a table like this ,
    i need primary key for both column -- id,FNumber


    Qt Code:
    1. ret = query.exec("create table FilterNumTable "
    2. "(id integer,"
    3. "FNumber varchar(20),"
    4. "Enable varchar(30),"
    5. "Disable varchar(30),"
    6. "PRIMARY KEY (FNumber , id))");
    To copy to clipboard, switch view to plain text mode 

    Table itself not creating>any one have idea in QT to how to creata a table with two
    primary column.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Table Creation Problem.

    Be careful with the queries themselves. There are various SQL dialects. Which database are you using?

  3. #3
    Join Date
    Jul 2009
    Posts
    139
    Thanks
    13
    Thanked 59 Times in 52 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Table Creation Problem.

    What does:
    Qt Code:
    1. query.lastError().text()
    To copy to clipboard, switch view to plain text mode 
    return? What database are you using?

  4. #4
    Join Date
    Feb 2010
    Posts
    23
    Qt products
    Qt3 Qt4
    Platforms
    Windows Symbian S60

    Question Re: Table Creation Problem.

    Quote Originally Posted by tbscope View Post
    Be careful with the queries themselves. There are various SQL dialects. Which database are you using?
    so how to create with two primay keys

  5. #5
    Join Date
    Feb 2010
    Posts
    23
    Qt products
    Qt3 Qt4
    Platforms
    Windows Symbian S60

    Question Re: Table Creation Problem.

    thx to all,
    issue resolved.

Similar Threads

  1. Variable table name problem
    By waynew in forum Qt Programming
    Replies: 4
    Last Post: 12th March 2010, 01:41
  2. I have a problem to modify table
    By Abk in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2007, 20:11
  3. Table Column Problem
    By kenny_isles in forum Newbie
    Replies: 1
    Last Post: 5th March 2007, 23:35
  4. Relational Table Model Problem
    By aekilic in forum Qt Programming
    Replies: 2
    Last Post: 20th January 2007, 14:57
  5. Table Shortcuts Problem
    By ankurjain in forum Qt Programming
    Replies: 2
    Last Post: 27th April 2006, 08:31

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.