Solved

What is the Syntax for Select variables for iSeries OLE Sources

Posted on 2009-05-04
14
715 Views
Last Modified: 2013-11-10
Hi,

I'm getting the syntax error below when I try to use a variable for AS400 (iSeries) selects.  When I type the command in directly it works fine.

I'm just surrounding the SQL in quotes and changing my OLE Db Source to variable.  My variable has been set to Evaluate Expression =  True.

Thanks for any help you can lend me.

Todd

AS400-Error.jpg
AS400-Variable-Select.jpg
0
Comment
Question by:ToddFields2
[X]
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
  • 8
  • 6
14 Comments
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 24300149
Drop the double quotes.

- Gary Patterson
0
 

Author Comment

by:ToddFields2
ID: 24300248
Thanks Gary.

I went ahead and removed the quotes.

I'm having trouble with the OLE Db Source config.  I type in the SQL command direclty without using a variable and get the error below.  When I click on columns, I see the resulting columns from my select.

I had been using a data reader source, but I don't see a variable option.

Thanks,
Todd



AS400-Reader.jpg
0
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 24300305
What happens when you click "OK"?
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:ToddFields2
ID: 24300319
I get the following error.
AS400-Codepage.jpg
0
 

Author Comment

by:ToddFields2
ID: 24300333
Error Message:

Warning      1      Validation warning. Data Flow Task: OLE DB Source [1]: Cannot retrieve the column code page info from the OLE DB provider.  If the component supports the "DefaultCodePage" property, the code page from that property will be used.  Change the value of the property if the current string code page values are incorrect.  If the component does not support the property, the code page from the component's locale ID will be used.      SSIS_ODSLoadFull.dtsx      0      0      
0
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 24300409
That just looks like the same warning.  Unless you need to do code page conversion it shouldn't matter.
0
 

Author Comment

by:ToddFields2
ID: 24300465
I trimmed down the source to just two fields and got an error:

[OLE DB Source [1]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E00.

[DTS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "OLE DB Source" (1) returned error code 0xC0202009.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.

[DTS.Pipeline] Error: SSIS Error Code DTS_E_THREADFAILED.  Thread "SourceThread0" has exited with error code 0xC0047038.  There may be error messages posted before this with more information on why the thread has exited.

0
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 24300583
0
 

Accepted Solution

by:
ToddFields2 earned 0 total points
ID: 24306155
How can I find the latest AS400 driver.  I think my connection is using an old driver.
AS400-Connection.jpg
0
 

Author Comment

by:ToddFields2
ID: 24377438
My AS400 driver is from 2005.  The new one in this solution is only good for Enterprise edition, not standard.
0
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 24378170
The latest IBM drivers are a component of the IBM iSeries Access (Client Access, System i Access, whatever) program.  A media kit should have come with your system or latest OS upgrade.

- Gary Patterson
0
 

Author Comment

by:ToddFields2
ID: 24378209
Thanks Gary.  This verifies what IBM indicated.  It still does not offer a solution to creating a dynamic query on the AS400 platform in SQL Server 2005 Standard Edition.  I may just be out of luck.

Todd
0
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 24378337
Have you seen this thread?  I don't have SQL 2005 and VS 2005 any more, so I can't walk you through it myself:

http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/4128e62f-92d1-4125-baa3-fdd9fed59d48

- Gary Patterson
0
 

Author Comment

by:ToddFields2
ID: 24386097
I did review this link.  I do have a working AS400 connection, I just can't create a dynamic query.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Format Date fields 11 56
How can I modify my merge data stored procedure? 3 34
SQL Server 2014 Express vs Full - Service Pack question 5 45
HIghlights of SSIS? 3 40
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

738 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