dbTalk Databases Forums  

SQLBindParameter i5 (AS400) transform task

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SQLBindParameter i5 (AS400) transform task in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike
 
Posts: n/a

Default SQLBindParameter i5 (AS400) transform task - 06-16-2006 , 02:22 PM






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_ALLOC
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.

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: SQLBindParameter i5 (AS400) transform task - 06-17-2006 , 09:01 AM






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

Quote:
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.




Reply With Quote
  #3  
Old   
Mike
 
Posts: n/a

Default Re: SQLBindParameter i5 (AS400) transform task - 06-19-2006 , 11:39 AM



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:

Quote:
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.





Reply With Quote
  #4  
Old   
Mike
 
Posts: n/a

Default Re: SQLBindParameter i5 (AS400) transform task - 06-20-2006 , 08:44 AM



It is a little cumbersome and I had to do a little additional research to
find the proper naming of my data transform tasks, but this is what I need to
get it working.

For anybody else who might be experiencing a similar issue, the link Allan
provided is what got me over the hump. Also, this MS page helped:
http://support.microsoft.com/default...242391&sd=tech

Specifically the part that says:
NOTE: The description of a task is displayed in the DTS designer, but it
cannot be used to directly reference a task in an ActiveX script. The name of
the task should be used to reference the task from an ActiveX script. To get
the name of the task look at the workflow properties for the step name. The
task name is the same as the step except the word 'Step' is replaced with
'Task'. For example, DTSStep_DTSDataPumpTask_1 becomes
DTSTask_DTSDataPumpTask_1.

Thanks for the help,
Mike

"Mike" wrote:

Quote:
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.





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.