How to insert a STRING value here?

I have an action JSP page that has a CallableStatement to a stored procedure (SP).
In the statement I have each parameter listed that will be passed to the SP.
All of the parameters are set as request.getParameter("parameterName")); because they are parameters passed from a form.

What I want to do is change two of these and set them equal to a local string that is defined on the action page.  In other works, I want to use two local strings as two of the parameters for the CallableStatement instead of two of the form parameters that is passed.

Here is a code snippet of what I have today:
I want to change the "request.getParameter("TYPE"));"  to a local string value
What is the syntax for this?
CallableStatement cs = connection.prepareCall("{CALL CBSTDTFI.CMUPDATE39 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}");
 cs.setString(1,request.getParameter("TYPE"));
 cs.setString(2,request.getParameter("CURDATE"));

Open in new window

LVL 1
g118481Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
CEHJConnect With a Mentor Commented:
All you need to do is something like the following for each:
 cs.setString(1,someLocalString);

Open in new window

0
 
objectsCommented:
just replace request.getParameter() with the local string varibale you want to use

If its not a String then use setObject() instead of setString()

0
 
g118481Author Commented:
Thank you for the quick response.
0
 
CEHJCommented:
:-)
0
All Courses

From novice to tech pro — start learning today.