Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QAxObject and msvc
Forum Updated to NodeBB v4.3 + New Features

QAxObject and msvc

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 623 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mrdebugM Offline
    mrdebugM Offline
    mrdebug
    wrote on last edited by
    #1

    Hi. I'm trying to connect to a sql server by ado using the component QAxObject and these lines of code:

    QAxObject *connection = new QAxObject("ADODB.Connection");
    connection->dynamicCall("Open(\"Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=Inaz;Data Source=SERVER02\")");
    
    // Execute query and get recordset
    QAxObject *recordSet = connection->querySubObject("Execute(\"select column01 from table01\")");
    // Get fields
    // or check https://msdn.microsoft.com/en-us/library/ms681510(v=vs.85).aspx to see what you can do with and how to use a recordset
    QAxObject *fields = recordSet->querySubObject("Fields");
    

    But I obtain this error:
    -2147467259

    The example
    http://wiki.qt.io/Using_ActiveX_Object_in_Qt

    goes to crash.

    How can I do to resolve my problem?

    Need programmers to hire?
    www.labcsp.com
    www.denisgottardello.it
    GMT+1
    Skype: mrdebug

    1 Reply Last reply
    0
    • mrdebugM Offline
      mrdebugM Offline
      mrdebug
      wrote on last edited by
      #2

      After many tries the software works using an ado connection through odbc but not directly to a sql server.

      Have you got any idea?

      Need programmers to hire?
      www.labcsp.com
      www.denisgottardello.it
      GMT+1
      Skype: mrdebug

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved