Results 1 to 6 of 6

Thread: Access to a SQL SERVER database from Linux

  1. #1
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    694
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Access to a SQL SERVER database from Linux

    Hi to all, nice the new text editor.
    I wrote an application that's working under Linux, ubuntu in this case.
    Unfortunately I need to interact with a MS SQL SERVER from it and I'm unable to do it working.
    I read that Qt access to a microsoft sql server using odbc. I read some document in internet but I'm unable to set
    it property.
    Can I have some guide line or help?
    Best Regards,
    Franco
    Franco Amato

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Access to a SQL SERVER database from Linux

    At least give us a hint what you have tried, how far you got, what does and does not work, what documents you have read etc. We don't even know if you want to do this from the Linux machine or if the application has moved to Windows where you are most likely to deal with Microsoft's database.

    To do it from Linux you will need to get ODBC for Linux working first, build the Qt ODBC plugin, and then make your program use it. To do it from Windows you can skip the first step and adjust the instructions for the QtSDK if that is what you are using. It's all in the documentation.

  3. #3
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    694
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Access to a SQL SERVER database from Linux

    Hi Chris,
    Yes the code should work on Linux not windows.
    I downloaded QODBC from package manager ( synaptic ) than I copied it at binary level in this folder structure /plugins/sqldrivers/odbcdriver. Then I download from Linux a odbc driver and tried to configure but without success, I'm not sure is the correct driver and I'm sure I configured it well...
    Can you point me to the right way? Can you give a link from where download the correct odbc driver for MS SQL SERVER and if you can how configure it?
    Best Regards,
    Franco
    Franco Amato

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Access to a SQL SERVER database from Linux

    You need to install unixODBC. You can get this from Ubuntu repositories I think.

    You need to build the QODBC plugin. The instructions are in the documentation.

    You need a UNIX/Linux ODBC driver for Microsoft SQL Server. I am not aware of any free driver. See http://www.unixodbc.org/
    Last edited by wysota; 15th April 2012 at 17:36.

  5. #5
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    694
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Access to a SQL SERVER database from Linux

    Hi thank you very much.
    The documentation link you sent doesn't work...
    Regards,
    Franco
    Franco Amato

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Access to a SQL SERVER database from Linux

    Try again now.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. The following user says thank you to wysota for this useful post:

    franco.amato (15th April 2012)

Similar Threads

  1. access to ftp server
    By peace_comp in forum Qt Programming
    Replies: 3
    Last Post: 31st May 2008, 16:34
  2. Access to PostgreSQL DB on a linux server
    By rmagro in forum Qt Programming
    Replies: 28
    Last Post: 13th March 2008, 09:02
  3. Database access from Qt
    By nimmyj in forum Qt Programming
    Replies: 1
    Last Post: 23rd November 2006, 06:51
  4. Database access from Qt
    By nimmyj in forum General Discussion
    Replies: 1
    Last Post: 16th November 2006, 14:11
  5. Replies: 1
    Last Post: 4th October 2006, 16:05

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.