![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a DTS package that has several Transform Data Tasks that copy data from SQL Server to SQL Server in based on a global parameter retrieved from a query. The queries are all of a form similar to: SELECT JOB_NUMBER_ALLOC,PO_NUMBER_ALLOC,DATE_ISSUED_ALLOC ,EXTENDED_TOTAL_ALLO C from JOBSCOPEDB.IPALLOC WHERE LEFT(JOB_NUMBER_ALLOC, 5) = ? And it runs fine going from SQL Server to SQL Server. This is just for dev, though. In production, we need to go from an i5 (AS400) to SQL Server using the iSeries ODBC connection. When I attempt to run the exact same query, I get the following error: [IBM][iSeries Access ODBC Driver]SQLBindParameter has not been called for parameter 1. I've Googled for that error message and get different results. They all seem to want to run that command in the context of a compiled program, though. Does anyone have experience doing this or aware of a way to do it using a straight SQL Statement? Thanks in advance. |
#3
| |||
| |||
|
|
Hello Mike, Some drivers are just funny when it comes to parameters. A way around it would be to use something like this article Global Variables and SQL statements in DTS (http://www.sqldts.com/default.aspx?205) Allan I have a DTS package that has several Transform Data Tasks that copy data from SQL Server to SQL Server in based on a global parameter retrieved from a query. The queries are all of a form similar to: SELECT JOB_NUMBER_ALLOC,PO_NUMBER_ALLOC,DATE_ISSUED_ALLOC ,EXTENDED_TOTAL_ALLO C from JOBSCOPEDB.IPALLOC WHERE LEFT(JOB_NUMBER_ALLOC, 5) = ? And it runs fine going from SQL Server to SQL Server. This is just for dev, though. In production, we need to go from an i5 (AS400) to SQL Server using the iSeries ODBC connection. When I attempt to run the exact same query, I get the following error: [IBM][iSeries Access ODBC Driver]SQLBindParameter has not been called for parameter 1. I've Googled for that error message and get different results. They all seem to want to run that command in the context of a compiled program, though. Does anyone have experience doing this or aware of a way to do it using a straight SQL Statement? Thanks in advance. |
#4
| |||
| |||
|
|
Allan, Thanks for the link; I didn't find that one. I'll give it a go and let you know how it goes. --Mike "Allan Mitchell" wrote: Hello Mike, Some drivers are just funny when it comes to parameters. A way around it would be to use something like this article Global Variables and SQL statements in DTS (http://www.sqldts.com/default.aspx?205) Allan I have a DTS package that has several Transform Data Tasks that copy data from SQL Server to SQL Server in based on a global parameter retrieved from a query. The queries are all of a form similar to: SELECT JOB_NUMBER_ALLOC,PO_NUMBER_ALLOC,DATE_ISSUED_ALLOC ,EXTENDED_TOTAL_ALLO C from JOBSCOPEDB.IPALLOC WHERE LEFT(JOB_NUMBER_ALLOC, 5) = ? And it runs fine going from SQL Server to SQL Server. This is just for dev, though. In production, we need to go from an i5 (AS400) to SQL Server using the iSeries ODBC connection. When I attempt to run the exact same query, I get the following error: [IBM][iSeries Access ODBC Driver]SQLBindParameter has not been called for parameter 1. I've Googled for that error message and get different results. They all seem to want to run that command in the context of a compiled program, though. Does anyone have experience doing this or aware of a way to do it using a straight SQL Statement? Thanks in advance. |
![]() |
| Thread Tools | |
| Display Modes | |
| |