How to run an MS Access module from SSIS?

  • Hi everyone,

    I need to run a VBA function in an MS Access database in SSIS.

    I put a Execute SQL Task in control flow and link it to the mdb then wrote a simple query

    like that : Select CleanseData() . CleanseData is the name of the method in my access module and

    it does some DML things and returns. It does not need to return any dataset to the SSIS. I just set the

    return type to boolean.

    When I run the package it issues the Error:

    [Execute SQL Task] Error: Executing the query " SELECT CleanseData()" failed with the following error: "Undefined function 'CleanseData' in expression.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

    Can anyone help please?

  • like that : Select CleanseData() . CleanseData is the name of the method in my access module and

    it does some DML things and returns. It does not need to return any dataset to the SSIS. I just set the

    return type to boolean.

    you need to execute all those statements in the SQL Execute Task which are written in that VBA function. VBA function can only be interpreted by access db not outside of it.

  • Mr.Sahand (8/25/2014)


    Hi everyone,

    I need to run a VBA function in an MS Access database in SSIS.

    I put a Execute SQL Task in control flow and link it to the mdb then wrote a simple query

    like that : Select CleanseData() . CleanseData is the name of the method in my access module and

    it does some DML things and returns. It does not need to return any dataset to the SSIS. I just set the

    return type to boolean.

    When I run the package it issues the Error:

    [Execute SQL Task] Error: Executing the query " SELECT CleanseData()" failed with the following error: "Undefined function 'CleanseData' in expression.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

    Can anyone help please?

    You will have to use the Office Interop Assemblies in a script task, not ideal but works (most of the time)

    😎

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

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