We help IT Professionals succeed at work.
Get Started

stored procedure

globalterminal
on
1,271 Views
Last Modified: 2013-12-06
i am having trouble gettting a stored procedure to work.  Using the following code i get this error:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E37)
[IBM][Client Access Express ODBC Driver (32-bit)][DB2/400 SQL]SQL7967 - PREPARE of statement QZ92D3E2CF9BFB1000 completed.

this is the code..its failing on the Execute statement.

Dim rsRETax,NewConnxRETax,NewCommandxRETax

set NewConnxRETax                         = server.CreateObject("ADODB.Connection")
NewConnxRETax.Open "test","gblodbc","odbcgbl"
      
set NewCommandxRETax                   = server.CreateObject ("ADODB.Command")
set NewCommandxRETax.ActiveConnection = NewConnxRETax

NewCommandxRETax.CommandText = "getOpenDvirByChassis"
NewCommandxRETax.CommandType = 4

NewCommandxRETax.Parameters.Append NewCommandxRETax.CreateParameter("term-code",200,1,30)
 NewCommandxRETax.Parameters.Append NewCommandxRETax.CreateParameter("chassis-number",200,1,30)

NewCommandxRETax("term-code") = "GBLDEV"
NewCommandxRETax("chassis-number") = "APLZ330211"

set rsRETax = NewCommandxRETax.Execute
set rsRETax = rsRETax.NextRecordset()

While not rsRETax.eof
     Response.Write "*" &  rsRETax(0) & "*"  & rsRETax(1) & "<br>"
     rsRETax.MoveNext
Wend
Comment
Watch Question
Expert for hire: IBM i, AIX, Linux, Windows, DB2, Performance, Security. EDI
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 2 Answers and 6 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE