Getting Pre-execute error when attempting to use SSIS

Posted on 2007-04-09
Last Modified: 2012-06-21

below is my error message when attempting to use the import/export wizard using SQL Server 2005.  I am connecting to an ODBC source.

- Pre-execute (Error)
Error 0xc0202009: Data Flow Task: An OLE DB error has occurred. Error code: 0x80040E21.
An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E21  Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".
 (SQL Server Import and Export Wizard)
Error 0xc0202025: Data Flow Task: Cannot create an OLE DB accessor. Verify that the column metadata is valid.
 (SQL Server Import and Export Wizard)
Error 0xc004701a: Data Flow Task: component "Destination - Query" (16) failed the pre-execute phase and returned error code 0xC0202025.
 (SQL Server Import and Export Wizard)
Below is my sql query:

   QF.ORD.ORD_NUM AS ordernum
   AND (QF.SUB.SUB_STATUSDATE > { d '2002-01-01'})

And here is the auto generated sql query
CREATE TABLE [test].[dbo].[Query] (
[ordernum] nvarchar(1) NOT NULL

Please help.  I am getting way too many grey hairs.  =)
Question by:brdrok
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 26

Accepted Solution

DireOrbAnt earned 500 total points
ID: 18878163
Does this help:

So changing:
[ordernum] nvarchar(1) NOT NULL
[ordernum] nvarchar(max) NOT NULL

Author Comment

ID: 18879041
yes that did the trick.  I don't understand why sql server 2005 would map it as nvarchar(1).  Also, could those error messages be any more obscure =)  Sorry, don't mean to grip.

thanks for your help.
LVL 26

Expert Comment

ID: 18879167
Try: Unspecified Error


Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Removing SCCM 2016 4 44
SSIS Column mapping 5 39
Failover Cluster Primary Nodes Current Vote = 0 5 28
SQL Server Error: 4060 8 22
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question