Results 1 to 7 of 7

Thread: what's the relationship between QOCI and OCI ?

  1. #1
    Join Date
    Jan 2014
    Posts
    20
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default what's the relationship between QOCI and OCI ?

    Hi,
    As subject, i know Oracle database provide oci api to access the database while Qt provide the QSql(include the QSqlQuery, QSqlTableModel and so on) to access, what's the relationship between them? Whether the QSql just envelop the oci ? In other words,whether the underlying implementation of QSql is oci?
    And if the oci interface is the same on any platform(such as Qt or VC)?
    Thanks very much!

  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: what's the relationship between QOCI and OCI ?

    Yes, the QOCI plugin wraps the Oracle supplied OCI library to provide the unified Qt interface.

    The Oracle component is a C library. You should be able to use any Qt compatible compiler with that: Microsoft's VC++ or MingW on Windows.

  3. #3
    Join Date
    Jan 2014
    Posts
    20
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: what's the relationship between QOCI and OCI ?

    Quote Originally Posted by ChrisW67 View Post
    Yes, the QOCI plugin wraps the Oracle supplied OCI library to provide the unified Qt interface.

    The Oracle component is a C library. You should be able to use any Qt compatible compiler with that: Microsoft's VC++ or MingW on Windows.
    Thanks very much!
    So there is another question, it's so slow( about 3-5s to 5000 rows ) when i use QOCI to access database(eg. QSqlQuery api) to select the one table which include blob fileds , but it's more fast when i use oci to do the same work.
    Why?
    When i change QSqlTableMode to access database, i use operation "fetchMore()" to traverse the all rows of table, it's wasting time so much! How can i get over this?

  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: what's the relationship between QOCI and OCI ?

    Do not select the blob field.
    The OCI interface does not retrieve the content of the blob until you explicitly fetch its using the lob column value from the result set. The Qt interface actually fetches the data in the blob field for every row.

  5. #5
    Join Date
    Jan 2014
    Posts
    20
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: what's the relationship between QOCI and OCI ?

    Quote Originally Posted by ChrisW67 View Post
    Do not select the blob field.
    The OCI interface does not retrieve the content of the blob until you explicitly fetch its using the lob column value from the result set. The Qt interface actually fetches the data in the blob field for every row.
    Thanks once again! you're so warm-heart. It's unfortunately that the blob field is just what i need and sometimes i need to get all the rows at once rather than a part of them a time. How to get over this? That as fast as QOCI (or oci) can go?
    Thanks!

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: what's the relationship between QOCI and OCI ?

    I have my doubts that you need all the blobs from all rows at the same time.

    What exactly are you doing with those blobs once you have them?

    Cheers,
    _

  7. #7
    Join Date
    Jan 2014
    Posts
    20
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: what's the relationship between QOCI and OCI ?

    Quote Originally Posted by anda_skoa View Post
    I have my doubts that you need all the blobs from all rows at the same time.

    What exactly are you doing with those blobs once you have them?

    Cheers,
    _
    Thanks first!
    Like map information, each blob is a line consisted of so many points represent road or river, and info of several tables is current info need to show on screen at a time.
    So i need to select whole table at once.

Similar Threads

  1. How to load QOCI driver
    By narlapavan in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2012, 01:51
  2. QOCI..query selection...
    By KillGabio in forum Newbie
    Replies: 2
    Last Post: 11th February 2012, 06:41
  3. Qoci
    By hashimov in forum Qt Programming
    Replies: 2
    Last Post: 15th December 2011, 09:56
  4. QOci with qt 4.7.3 x64
    By Harald Klingel in forum Qt Programming
    Replies: 1
    Last Post: 25th July 2011, 08:17
  5. QOCI plugin with Oracle RAC
    By davidovv in forum Qt Programming
    Replies: 4
    Last Post: 7th July 2011, 11:54

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.