Help needed on DTS: meaning of the 4 arguments of the Execute method of IDTSCustomTask

Help needed on DTS: meaning of the 4 arguments of the Execute method of IDTSCustomTask

Post by Eric Paesman » Wed, 09 Feb 2000 04:00:00

What are the arguments of the Execute method of the IDTSCustomTask meant
for (pPackage,pPackageLog,...) ?
            virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
            /* [in] */ IDispatch __RPC_FAR *pPackage,
            /* [in] */ IDispatch __RPC_FAR *pPackageEvents,
            /* [in] */ IDispatch __RPC_FAR *pPackageLog,
            /* [out][in] */ LONG __RPC_FAR *pTaskResult) = 0;
How may the package return an error message to replace the standard:
    "The task reported failure on execution"

1. Need help with Execute method of Command object

I am newly into ADO. Have written a small test program to create a table in
an Access database. I am trying to use the Execute method of the Command
object. However I am getting a null pointer assignment somewhere in my
Since the SQL query I am firing is a non-recordset returning one, I am
passing all NULLs to the Execute method. Is that all right?

Also, the MSDN documentation for the Command.Execute method (which is in
Visual Basic syntax, and to which I am not too familiar) says that this
method takes only 3 parameters. But I got a compilation error on using only
3 parameters. On looking into adoint.h, I saw that the function takes 4
parameters.  Can someone show me the light on this?

I could get similar queries to work with the Recordset.Open method.

Thanks in advance.
Sabyasachi Basu

#define INITGUID
#include <windows.h>
#include <ole2.h>
#include <adoint.h>
#include <adoid.h>
#include <iostream.h>

int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmdLine, int

 ADOConnection * pCon = NULL;
 CoCreateInstance (CLSID_CADOConnection,
      (void **)&pCon);

 HRESULT hr = pCon->Open(_T("data source=testDSN;user id=;password=;"),NULL,
NULL, 0);
 if (SUCCEEDED(hr))
  MessageBox(NULL, _T("Data source opened"), _T("Debug"), MB_OK);

 ADOCommand *pComm = NULL;

      (void **)&pComm

 pComm->put_CommandText(_T("CREATE TABLE myTable3 (id3 int not NULL)"));
 vConn.vt = VT_UNKNOWN;
 vConn.punkVal = (IUnknown *)pCon;


 hr = pComm->Execute(NULL, NULL, NULL, NULL);
 if (TRUE == SUCCEEDED(hr))
  MessageBox(NULL, _T("Command Execute succeeded!"), _T("Debug"), MB_OK);
  MessageBox(NULL, _T("Command Execute failed!"), _T("Debug"), MB_OK);



 return 0;

2. Remote Views

3. Cannot Open any tools in SQL 2000

4. Newbie need help for execute method pls

5. US-GA - ATL - Oracle 7 DBA - Tuning,replication,

6. Help executing DTS Package needed

7. How can I get iSQL_w to show all the Money decimal places?

8. DTS Lookup doesn't have an Execute method

9. DTS Execute method

10. Return Status of DTS Package .Execute Method