Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8373053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:34:58+00:00 2026-06-09T14:34:58+00:00

I have an SSIS package which iterates over a table, and for each row

  • 0

I have an SSIS package which iterates over a table, and for each row in the table, passes the values from two different columns as parameters to a stored procedure. At least, that’s what it is supposed to do. What it actually does is give me this error:

[Execute SQL Task] Error: Executing the query "EXEC sproc_AccessImport @mAccessLocation (SELECT M..." failed with the following error: "Must declare the scalar variable "@mAccessLocation".". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

I followed this tutorial in order to make the part that grabs the info, and the code that is supposed to execute the stored procedure is:

EXEC sproc_AccessImport @mAccessLocation (SELECT MVID FROM tbl_AccessMailDataFiles WHERE FileLocation = @mAccessLocation)

I’ve been looking around online, but haven’t found anything useful. This is the first time I’ve used SSIS, so I suspect I’m simply doing something wrong. Does anyone know what exactly that is? Thanks.

Edit: I tried mapping the variable as a parameter, with the options:

Variable Name:  User::mAccessLocation
Direction:      Input
Data Type:      VARCHAR
Parameter Name: Path
Parameter Size: 200

And changed the SQL query to:

EXEC sproc_AccessImport @Path (SELECT MVID FROM tbl_AccessMailDataFiles WHERE FileLocation = @Path)

It now gives me the error:

[Execute SQL Task] Error: Executing the query "EXEC sproc_AccessImport @Path (SELECT MVID FROM tb..." failed with the following error: "Must declare the scalar variable "@Path".". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

So, really, the same error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:34:59+00:00Added an answer on June 9, 2026 at 2:34 pm

    Depending on how your package is set up you may need to map the SSIS variables to the parameters within the Execute SQL Task. the specific error you are seeing is most liklely because you are using an OLEDB connection and the statment should probably read

    EXEC sproc_AccessImport ? (SELECT MVID FROM tbl_AccessMailDataFiles WHERE FileLocation = ?) 
    

    If you are following the example you linked to then you would map the User::mAccessLocation to the first and second parameter. I hope that makes sense, but I’m not 100% on how you have this set up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ssis package...which read data from fixed-column-width text file into DB table.
I have simple SSIS package which reads data from flat file and insert into
I have a SSIS package which exports data from a query into a flat
Within an SSIS package I have a dataflow that extracts two coloumns from an
I have an SSIS package that exports data from a table on a SQL
i want to create one ssis package which takes values from flat file and
I have an ssis package that imports a view from one database into different
I have an SSIS package which transfers the data from one database to another.
I have a small SSIS package which exports data to a excel file from
i have an ssis Package which runs on business days (mon-Fri). if i receive

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.