We help IT Professionals succeed at work.
Get Started

as400 stored procedure using classic ASP

Last Modified: 2012-05-09
i need to call an AS400 DB2 stored procedure from a classic ASP page.  
using the following:
     Dim termcode
     Dim chassisnumber
     Dim StrProc
     Dim strProcCMD
     Dim RST

      chassisnumber            = "APLZ330211"
      termcode                   = "GBLDEV"

     Set STRProc = Server.Createobject("adodb.connection")
     STRProc.open "test","gblodbc","odbcgbl"
     Set strProcCMD = server.createobject("adodb.command")
     Set strProcCMD.ActiveConnection = STRProc
     strProcCMD.CommandText = "call getOpenDvirByChassis(termcode, chassisnumber);"
      Set RST = strProcCMD.Execute

then i should be able to iterate thur the recordset.

i get the this error:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[IBM][Client Access Express ODBC Driver (32-bit)][DB2/400 SQL]SQL0104 - Token TERMCODE was not valid. Valid tokens: :.

what is wrong with the parameters.
I think i need to use a different method.

Watch Question
This problem has been solved!
Unlock 2 Answers and 3 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