Results 1 to 3 of 3

Thread: postgre SQL connection

  1. #1
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post postgre SQL connection

    hi,
    i want to connect to postgre sql database.

    for that i checked available drivers through qt program.

    bool a=db.isDriverAvailable(QODBC);
    here a=0;
    i have only QSQLITE .
    but for postgresql QODBC/QPSQL required
    so i tried to build ODBC in the following way. but iam getting error

    D:\>cd qt\4.4.3\src\plugins\sqldrivers\odbc

    D:\Qt\4.4.3\src\plugins\sqldrivers\odbc>qmake -o Makefile odbc.pro

    D:\Qt\4.4.3\src\plugins\sqldrivers\odbc>nmake
    [output]
    Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
    Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

    NMAKE -f Makefile.Debug all

    Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
    Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

    rc -D_DEBUG -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_CAST_TO_ASCII -DQT_
    NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_S
    UPPORT -fo tmp\obj\debug_shared\qsqlodbcd_resource.res qsqlodbcd_resource.rc
    qsqlodbcd_resource.rc(4) : fatal error RC1015: cannot open include file 'winver.
    h'.
    NMAKE : fatal error U1077: 'rc' : return code '0x1'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\VC98\bin\N
    MAKE.EXE"' : return code '0x2'
    Stop.[/output]

    can anyone help me ?

    thanks in advance.

  2. #2
    Join Date
    Mar 2008
    Location
    Houston, Texas, USA
    Posts
    277
    Thanks
    9
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: postgre SQL connection

    Stop using Visual C++ 6. Get the newer version 2008
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

  3. #3
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: postgre SQL connection

    You don't need to QODBC for PostgreSQL. QPSQL will be enough.
    Take a look at docs on how to build this plugin.
    I'm a rebel in the S.D.G.

Similar Threads

  1. Sql, dupicate connection
    By giusepped in forum Qt Programming
    Replies: 8
    Last Post: 2nd November 2008, 15:34
  2. SQL connection closure problem.
    By cbarmpar in forum Qt Programming
    Replies: 1
    Last Post: 8th September 2008, 08:42
  3. Client/Server Error: BadIDChoice
    By 3nc31 in forum Qt Programming
    Replies: 5
    Last Post: 27th November 2007, 10:22
  4. SQL connection problem
    By Mrdata in forum Qt Programming
    Replies: 2
    Last Post: 24th May 2007, 19:14
  5. Connection with MS SQL
    By manish_pesit in forum Qt Programming
    Replies: 4
    Last Post: 13th September 2006, 07:47

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.