Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. COM IDL

COM IDL

Scheduled Pinned Locked Moved C / C++ / MFC
c++comperformancequestion
3 Posts 2 Posters 2 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.
  • W Offline
    W Offline
    William Bartholomew
    wrote on last edited by
    #1

    Can anyone assist me I currently have a data-access layer written in VB and would like to port it over to C++ as I'm pretty sure there will be speed benefits in doing so... This is the prototype of the function currently in VB: Public Function RunSPReturnRS( ByVal sDSN As String, ByVal sSP As String, ParamArray params() As Variant) As ADODB.Recordset I have no problems with the first two strings but can anyone give me the IDL and the function prototype to handle the ParamArray and returning the Recordset??? I have been able to find any good samples on these... Many thanks, William :-D

    R 1 Reply Last reply
    0
    • W William Bartholomew

      Can anyone assist me I currently have a data-access layer written in VB and would like to port it over to C++ as I'm pretty sure there will be speed benefits in doing so... This is the prototype of the function currently in VB: Public Function RunSPReturnRS( ByVal sDSN As String, ByVal sSP As String, ParamArray params() As Variant) As ADODB.Recordset I have no problems with the first two strings but can anyone give me the IDL and the function prototype to handle the ParamArray and returning the Recordset??? I have been able to find any good samples on these... Many thanks, William :-D

      R Offline
      R Offline
      Richard Caetano
      wrote on last edited by
      #2

      William, This should work for ya: HRESULT RunSPReturnRS( [in] BSTR sDSN, [in] BSTR sSP, [in, out] SAFEARRAY(VARIANT)* params, [out, retval] _Recordset** ); You will also have to include the ADODB type library to compile in MIDL: importlib("msado21.tlb"); Hope this helps :) Richard Caetano http://www.caetano.com/richard --------------------------- Richard Caetano richard@caetano.com http://www.caetano.com/richard

      R 1 Reply Last reply
      0
      • R Richard Caetano

        William, This should work for ya: HRESULT RunSPReturnRS( [in] BSTR sDSN, [in] BSTR sSP, [in, out] SAFEARRAY(VARIANT)* params, [out, retval] _Recordset** ); You will also have to include the ADODB type library to compile in MIDL: importlib("msado21.tlb"); Hope this helps :) Richard Caetano http://www.caetano.com/richard --------------------------- Richard Caetano richard@caetano.com http://www.caetano.com/richard

        R Offline
        R Offline
        Richard Caetano
        wrote on last edited by
        #3

        Also I'd be curious to see how you're building that routine. It appears to be a routine to call stored procedures right? Thanks! Richard --------------------------- Richard Caetano richard@caetano.com http://www.caetano.com/richard

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups