Results 1 to 13 of 13

Thread: Qt Sql Features

  1. #1
    Join Date
    Feb 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Qt Sql Features

    Hello,

    While considering using Qt lgpl free license for its Qt Sql module, I wondered if you could answer some of the following questions:

    1. Does QtSql support MsSql and Sybase database types, including support for stored procedures?
    2. Does it utilize native bulk write apis for bulk write
    3. Can you specify a list of companies using QtSql
    4. Licensing, is it possible to change the code? what is the procedure for changing the code?
    5. Can a product use the library without exposing its source code?
    6. Support, suppose there is some problem, can there be support for the lgpl free license?
    7. Is there a community of users for the free lgpl version
    8. Can the library compile for Solaris, AIX and HP-UX?
    9. How complicated is it to add support for native sybase ct-lib and MsSql ole-db to QtSql?

    Thanks
    lk

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Qt Sql Features

    1. Does QtSql support MsSql and Sybase database types, including support for stored procedures?
    Here is list of supported databases Link
    2. Does it utilize native bulk write apis for bulk write
    Not sure what this means, if you mean BLOB, it depends the driver, if driver supported then yes.
    3. Can you specify a list of companies using QtSql
    This may be not practically possible, I will say most of the companies that Qt it self.
    4. Licensing, is it possible to change the code? what is the procedure for changing the code?
    LPGL does not allow to change the code. If change to code is required, go for GPL/Commercial Lic
    5. Can a product use the library without exposing its source code?
    Using LGPL user code need not be exposed, provided other requirement of LGPL are met
    6. Support, suppose there is some problem, can there be support for the lgpl free license?
    Forum like this and other are the places you an get help, or hire a Qt Expert.
    7. Is there a community of users for the free lgpl version
    Generally forums/community does not care about the licenses, it is only a technical place. But there may be some commercial license portals which may not be meant for GPL/LPGL license users
    8. Can the library compile for Solaris, AIX and HP-UX?
    Using LGPL, you cannot do that, all you can do is get the pre-built libraries from the qt-project.org.
    Here is list of supported platforms Link
    9. How complicated is it to add support for native sybase ct-lib and MsSql ole-db to QtSql?
    I will try put to put in kind of equation

    T = A + B * C;

    T - Total
    A - Knowledge of QtCore classes
    B - Knowledge of native database interface (libs)
    C - Knowledge of QtSql classes

    More details of about how to write driver is here Link
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. The following user says thank you to Santosh Reddy for this useful post:

    lk (15th February 2013)

  4. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Qt Sql Features

    Quote Originally Posted by Santosh Reddy View Post
    LPGL does not allow to change the code. If change to code is required, go for GPL/Commercial Lic
    You can change the code with LGPL but you have to publish that changes.

    Using LGPL, you cannot do that, all you can do is get the pre-built libraries from the qt-project.org.
    This is also not true. You can also build from sources for any platform. From the configure script
    bash Code:
    1. elif [ $COMMERCIAL_USER = "no" ]; then
    2. # Open Source edition - may only be used under the terms of the GPL or LGPL.
    3. [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes
    4. Licensee="Open Source"
    5. Edition="OpenSource"
    6. EditionString="Open Source"
    7. QT_EDITION="QT_EDITION_OPENSOURCE"
    8. fi
    To copy to clipboard, switch view to plain text mode 

  5. The following 2 users say thank you to Lykurg for this useful post:

    lk (15th February 2013), Santosh Reddy (14th February 2013)

  6. #4
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Qt Sql Features

    Thanks for correcting me, It is been a while I dealt with licenses
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  7. #5
    Join Date
    Feb 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt Sql Features

    Thank you for the quick response

    about
    Here is list of supported databases Link
    The link states that there was a Sybase driver named QTDS but it is obsolete from Qt 4.7

    Instead, there is the QODBC driver which can be used as a fallback for compliant databases, the question is whether Sybase can be used with this QODBC driver?

  8. #6
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Qt Sql Features

    the question is whether Sybase can be used with this QODBC driver?
    This would be a question to Sybase support system. Does Sybase drivers support ODBC interface?
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

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

    Default Re: Qt Sql Features

    Quote Originally Posted by lk View Post
    Hello,

    While considering using Qt lgpl free license for its Qt Sql module, I wondered if you could answer some of the following questions:

    1. Does QtSql support MsSql and Sybase database types, including support for stored procedures?
    2. Does it utilize native bulk write apis for bulk write
    3. Can you specify a list of companies using QtSql
    4. Licensing, is it possible to change the code? what is the procedure for changing the code?
    5. Can a product use the library without exposing its source code?
    6. Support, suppose there is some problem, can there be support for the lgpl free license?
    7. Is there a community of users for the free lgpl version
    8. Can the library compile for Solaris, AIX and HP-UX?
    9. How complicated is it to add support for native sybase ct-lib and MsSql ole-db to QtSql?
    If you guys don't mind, I will try to answer those questions again from a bit different perspective.

    QtSql provides a driver-agnostic interface to relational databases. It supports the common denominator of different SQL systems and dialects which basically means ANSI SQL. Support for particular database systems is provided by drivers that implement a given set of interfaces that the main library then uses to communicate with the database. One of the functions of the driver is to execute any possible SQL statement that may or may not return a result in a form of a set of records. Each driver can decide to implement more than the common denominator if the interface for QSqlDriver allows it. Furthermore totally custom things can be done by extracting the native handle to the low-level driver and using its API to access functions of that driver if it is acceptable that the application will not work with any other database system. You can even implement your own database driver if you have some custom database system that understands SQL. On the other hand if you are certain that your program is going to be tied to a particular DBMS (e.g. MsSql) and you need a wide range of functionality, it might be easier for you to use the native API of that DBMS directly without going through QtSql. To stress again, the aim of this library is to provide an abstract way to access different DBMS.

    Qt can be built for Solaris, AIX and HP-UX. Whether a particular SQL driver can build for a particular OS depends on this driver. The only difference between LGPL and commercial editions of Qt regarding SQL is that the latter does (or at least used to) come with prebuild OCI driver for Oracle.
    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.


  10. #8
    Join Date
    Feb 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt Sql Features

    Another features question is related to CLob/Text type support

    Can you specify which drivers support Text/CLob data types?

    More specifically, out of the drivers for Oracle, PostgreSql and ODBC (MsSql and Sybase)

    Thanks
    lk

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

    Default Re: Qt Sql Features

    Drivers don't care much about data types as long as they can be converted to something QVariant understands. Whether a particular driver understands a particular type, you can check in the sourcecode for that driver.
    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.


  12. #10
    Join Date
    Feb 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt Sql Features

    While looking in drivers source code for CLOB support, I noticed that in the ODBC driver QODBCDriver::hasFeature, the BLOB feature is enabled only if the DBMS is MySql
    Qt Code:
    1. case BLOB: {
    2. if(d->isMySqlServer)
    3. return true;
    4. else
    5. return false;
    6. }
    To copy to clipboard, switch view to plain text mode 
    Does that mean that CLOB is not supported for ODBC MsSql?

    How difficult will it be to add support for CLOB in ODBC MsSql?

    Thanks
    lk

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

    Default Re: Qt Sql Features

    Quote Originally Posted by lk View Post
    Does that mean that CLOB is not supported for ODBC MsSql?
    No, it means BLOB is only supported on MySql. It doesn't say anything about CLOB.
    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.


  14. #12
    Join Date
    Feb 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt Sql Features

    I have an additional thread safety question

    Suppose I create a connection using QSqlDatabase in a thread, then perform a set of operations synchronously, and after all these operations are complete, use the same connection from another thread

    Can such actions cause thread-safety issues?

    Thanks
    lk

  15. #13
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Qt Sql Features

    Yes. Only use a connection in that thread where you have established the connection.

Similar Threads

  1. All features on WinCE
    By Jef Patat in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 6th January 2010, 17:50
  2. -qt-style-features
    By metdos in forum Qt Programming
    Replies: 0
    Last Post: 31st August 2009, 13:59
  3. What are the new features in Qt-4.6?
    By h123 in forum Qt Programming
    Replies: 1
    Last Post: 30th July 2009, 15:04
  4. New features...
    By jpujolf in forum General Discussion
    Replies: 2
    Last Post: 22nd October 2008, 12:24

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.