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

  • Home
  • SEARCH
  • 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 5973529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:48:46+00:00 2026-05-22T20:48:46+00:00

I am a newbie to ssis and am having issues with the loading the

  • 0

I am a newbie to ssis and am having issues with the loading the results of a stored procedure that includes NULL values into a table with ssis. What I have is follows:

Step 1

Execute Stored Procedure on Database1 will return a Full Result Set and put into ADO object User::CallResults

Step 2

Then I Loop through the results of User::CallResults mapping 2 variables:

Variable         Index ADO object Type     Nullable  
User::ID         0      Object              NO  
User::Result     1        Object              Yes    

Step 3

Then in the Insert Row Into Database2 takes each row and executes “insert into dbo.myTable id, result values (?,?)”

I map ID as int and Result as long respectively.

When I execute I get the error:

failed with the following error: "An error occurred while extracting the
result into a variable of type (DBTYPE_I4)". Possible failure reasons:
Problems with the query, "ResultSet" property not set correctly,
parameters not set correctly, or connection not established correctly.

Seems like this it errors when there is a null in the Result. Any suggestions to make ssis allow nulls?

  • 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-05-22T20:48:47+00:00Added an answer on May 22, 2026 at 8:48 pm

    You can achieve the process that you have described in the question using Data Flow task. Here is a step by step description of fetching data using stored procedure and then inserting into a table, all done inside Data Flow task. This example is just to give an idea of how this can be done and it uses only a single instance of SQL Server.

    Step-by-step process:

    1. Create two tables named dbo.Source and dbo.Destination and populate the table dbo.Source with data as shown in screenshot #1. Create table scripts are provided under Scripts section.

    2. Create a stored procedure named dbo.GetData using the script provided under Scripts section.

    3. On the SSIS package, create a variable named StoredProcedure as shown in screenshot #2. This variable will contain the stored procedure execution statement.

    4. Create an OLE DB Connection in the Connection manager to connect to the SQL Server instance.

    5. On the Control Flow tab of the SSIS package, place a Data Flow task as shown in screenshot #3.

    6. Double-click on the Data flow task to navigate to the Data Flow tab. Inside the Data Flow tab, place an OLE DB Source and an OLE DB Destination as shown in screenshot #4.

    7. Configure the OLE DB Source as shown in screenshots #5 and #6. Notice that the source is using the variable that was created in step #3. The data returned by the stored procedure will be the source input.

    8. Configure the ‘OLE DB Destination` as shown in screenshots #7 and #8. This will insert the data into the destination table.

    9. Screenshot #9 displays sample package execution.

    10. Screenshot #10 shows the data in the tables after the package execution. Note that the destination table contains NULL values. This is possible because the column Qty can accept NULL values. However, if we had passed NULL values to the ItemNumber column, the package would have failed because the column is non-nullable.

    Hope that helps.

    Scripts:
    .

    CREATE TABLE [dbo].[Destination](
        [Id] [int] IDENTITY(1,1) NOT NULL,
        [ItemNumber] [varchar](50) NOT NULL,
        [Qty] [int] NULL,
    CONSTRAINT [PK_Destination] PRIMARY KEY CLUSTERED ([Id] ASC)) ON [PRIMARY]
    GO
    
    CREATE TABLE [dbo].[Source](
        [Id] [int] IDENTITY(1,1) NOT NULL,
        [ItemNumber] [varchar](50) NOT NULL,
        [Qty] [int] NULL,
    CONSTRAINT [PK_Source] PRIMARY KEY CLUSTERED ([Id] ASC)) ON [PRIMARY]
    GO
    
    CREATE PROCEDURE [dbo].[GetData]
    AS
    BEGIN
        SET NOCOUNT ON;
    
        SELECT      Id
                ,   ItemNumber
                ,   Qty
        FROM        dbo.Source
    END
    GO
    

    Screenshot #1:

    1

    Screenshot #2:

    2

    Screenshot #3:

    3

    Screenshot #4:

    4

    Screenshot #5:

    5

    Screenshot #6:

    6

    Screenshot #7:

    7

    Screenshot #8:

    8

    Screenshot #9:

    9

    Screenshot #10:

    10

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

Sidebar

Related Questions

Newbie question. I have a NSMutableArray that holds multiple objects (objects that stores Bezier
Newbie question. I have Django models that look like this: class Video(models.Model): uploaded_by =
(Newbie DBUnit question Alert!) It appears that DBUnit for each table 'deletes all the
I am a complete newbie to SSIS. I have a c#/sql server background. I
I'm a newbie to using SSIS for data imports - I have a couple
Newbie in the Linq to XML arena... I have a Linq query with results,
newbie question I have a multiselect box that i populate with some ajax and
Newbie Warning I have a simple but vexing problem trying to disable an NSButton.
Newbie question... The objective: I intend to have an HTML text input field as
Newbie question: I just installed VisualSVN Server and created a repository. I noticed that

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.