Re: Converting Command->Execute to Recordset->Open



First off, thank you for your input Mark.

The connection is set and open. Since execute of the command functions
properly, I think that every thing else is set up properly too.

You are correct that the second parameter is connection information
that must be omitted when a command object is passed in. vtMissing
accomplishes this. It took a lot of digging for me to find that, so I
will share.

vtMissing is a constant provided by ADO when it is #imported into C++.
It is a variant of type VT_ERROR and of value DISP_E_PARAMNOTFOUND. It
is used to specify that a parameter of type variant is omitted. A
parameter of type variant pointer is omitted with &vtMissing (or NULL
if one is sloppy) and a parameter of type string is omitted with a null
string ("").

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdhowhowvcusersshouldreadadodocumentation.asp
ADO Programmer's Guide
Appendix C: Programming with ADO
Using ADO with Microsoft Visual C++

Don't you feel better that you chose VB now Mark? :)

.



Relevant Pages

  • Re: C++ support for ADO
    ... TESTHR(pConn.CreateInstance(__uuidof(Connection))); ... In answer to your question I'm interested in ADO not the ADO.net. ... data classes for working with ADO/OLE DB. ... You can also use the OLE SDK. ...
    (microsoft.public.data.ado)
  • Re: ODBC/OLE DB Connection Pool
    ... > connection be kept open for the application as this will serialize all ... threads ONCE they are returned to the pool. ... > Tips for ADO Users ... > The ADO Connection object implicitly uses IDataInitialize. ...
    (microsoft.public.data.ado)
  • Re: ODBC/OLE DB Connection Pool
    ... > connection be kept open for the application as this will serialize all ... threads ONCE they are returned to the pool. ... > Tips for ADO Users ... > The ADO Connection object implicitly uses IDataInitialize. ...
    (microsoft.public.inetserver.asp.db)
  • Re: ODBC/OLE DB Connection Pool
    ... > connection be kept open for the application as this will serialize all ... threads ONCE they are returned to the pool. ... > Tips for ADO Users ... > The ADO Connection object implicitly uses IDataInitialize. ...
    (microsoft.public.data.oledb)
  • Re: How to make the app run?????
    ... throwing an error if the connection never was opened, ... How can i tell if i'm using ADO as in VB or .Net ADO ?? ... First of all, it was not shown to my customer, I took it to a very nice ... How do you get in "installed" on client computer? ...
    (microsoft.public.dotnet.general)