Solved

Getting Pre-execute error when attempting to use SSIS

Posted on 2007-04-09
3
3,369 Views
Last Modified: 2012-06-21
Hi,

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)
Messages
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:

SELECT
   QF.ORD.ORD_NUM AS ordernum
FROM        
   QF.ORD, QF.SUB, QF.CUS
WHERE    
   QF.ORD.ORD_DBASUB = QF.SUB.SUB_DBASUB
   AND QF.SUB.SUB_DBACUS = QF.CUS.CUS_DBACUS
   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.  =)
0
Comment
Question by:brdrok
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
DireOrbAnt earned 500 total points
ID: 18878163
Does this help:
http://cs.berwickheights.com/blogs/sjblog/archive/2006/09/22/SQLSvr2005Import.aspx

So changing:
[ordernum] nvarchar(1) NOT NULL
To:
[ordernum] nvarchar(max) NOT NULL
0
 
LVL 7

Author Comment

by:brdrok
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.
0
 
LVL 26

Expert Comment

by:DireOrbAnt
ID: 18879167
Try: Unspecified Error

;)
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
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…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now