Error: An OLE DB error has occurred. Error code: 0x80040E21.

  • Hi ALL,

    I have a ssis package which pulls data from sybase 9 ASA to sql server 2005.

    In the package i have 25 work flow task for each table.

    I have 2 global variables by names Last_Dt_Time and DTS_Start_time.

    For each task, I have a procedure which takes 2 as parameters.

    the logic is written in stored procedure in sybase.

    select * From table name where createdtime between Last_Dt_Time and DTS_Start_time.

    Out of 25 work flow task, I encounter problem with 2 tasks.

    THe error encountered is

    Error: An OLE DB error has occurred. Error code: 0x80040E21.

    An OLE DB record is available. Source: "ASAProv.90" Hresult: 0x80004005

    Description: "Cannot convert parameter 2 to a DBTYPE_DBDATE".

    [DTS.Pipeline] Error: component "Woparts" (1) failed the pre-execute phase and returned error code 0xC0202009.

    CREATE procedure DBA.INSGT_woparts(@last_dt_time datetime,@DTSCurrentStartDate datetime)

    as

    begin

    select Code, Description from dba.Codes_RequestsAction where createdtime between @last_dt_time and ,@DTSCurrentStartDate

    end

    I tried using cast and convert.

    Package works rest of the tables.

    Could any of us porvide any help. I am struck in between and already i have spent more than 100 hrs on this issue.

    Any help is appreciated.

    Thanks

    regards,

    Srinivas Govada

  • I would try passing your arguments as strings instead of datetimes. I have found both sybase and SSIS to be rather inconsistent when using datetime values (loss of precision being one problem).

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply