Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
There are four things to do when handling an unknown command:
Determine the parameters
Execute the command
Determine the output columns
See if there are multiple return rowsets
To do these things with the OLE DB Consumer Templates, use the CManualAccessor class and follow these steps:
Open a
CCommandobject withCManualAccessoras a template parameter.CCommand<CManualAccessor, CRowset, CMultipleResults> rs;Query the session for the
IDBSchemaRowsetinterface and use the procedure parameters rowset. If theIDBSchemaRowsetinterface isn't available, query for theICommandWithParametersinterface. CallGetParameterInfofor information. If neither interface is available, you can assume there are no parameters.For each parameter, call
AddParameterEntryto add the parameters and set them.Open the rowset but set the bind parameter to
false.Call
GetColumnInfoto retrieve the output columns. UseAddBindEntryto add the output column to the binding.Call
GetNextResultto determine if more rowsets are available. Repeat steps 2 through 5.
For an example of a manual accessor, see CDBListView::CallProcedure in the DBVIEWER sample.