passing parameters to AS400 query
Hello,
I'm using
IBM DB2 UDB for iSeries IBMDA400 OLE DB Provider
to extract data from AS400 and copy them to SQLServer2005. It's my first experience with exptracting data from AS400.
I need to pass in SSIS a parameter to the extract query like
SELECT dtses FROM oslglf3.flp016WHERE dtses > ?
I'm naming the parameter in the mapping as 1 but geetting an error
[as400 [1]] Error: The SQL command requires a parameter named ""00001"", which is not found in the parameter mapping.
I have tried 00001, '00001', ("00001" is not accepted from SSIS) but getting still this error.
A query like
SELECT dtses FROM oslglf3.flp016WHERE dtses > '1071205'
works OK.
Can anybody help me ?
thanks in advance
December 5th, 2007 1:29pm
Because all issues like this, I always put my SQL statements into SSIS variables and use expressions to change it at run time. With that technique not only you can pass parameters, but change schema and table names.
Please see this example, and make sure you read the Pros-cons listed in the link
http://rafael-salas.blogspot.com/2007/11/ssis-mapping-parameter-inside-of.html
Free Windows Admin Tool Kit Click here and download it now
December 5th, 2007 4:38pm
Thanks, that's a great and elegant idea !
December 5th, 2007 5:51pm
This bug is directly related to IBMDA400 from IBM Client Access Tools. There is a bug with the driver passing a parameter to the AS/400. I have proved this out using a third party driver from HiT Software. Passing 00001 is correct using their drivers. I suggesting trying a demo out to prove this.http://www.hitsw.com/products_services/downloads/dloledbsvr400_32.html
Free Windows Admin Tool Kit Click here and download it now
November 17th, 2009 7:02pm
The HiT Software Driver does support parameters very well. The client install only supports upto 3 concurrent connections, so most customers (developers) may need to buy the Server license. It can be a bit pricey for Server based license, and
it is licensed by CPU. It's a shame to have to purchase a third party driver for DB2, because the IBM driver doesn't work.
July 27th, 2010 11:42pm
Hi , Is there any way other than using third party drivers ? Vidyasagar
Free Windows Admin Tool Kit Click here and download it now
February 7th, 2011 11:34am
I had the same problem, and found that changing the parameter name to ""00001"" works just fine. (two sets of double-quotes surrounding the digits)
May 6th, 2011 8:10am


