Leo Marchowski

Greenhorn
+ Follow
since Oct 29, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Leo Marchowski

Hi,


I am simply trying to call a stored procedure that takes one parameter and returns a result set of 2 colums both of which are varchars. This is my code:

CallableStatement cStmt = null;
cStmt = conn.prepareCall( "{? = call getUsers(?) }" );
cStmt.registerOutParameter(1, OracleTypes.CURSOR);
cStmt.setString(2, "10026425");
cStmt.registerOutParameter(3, java.sql.Types.VARCHAR);
cStmt.registerOutParameter(4, java.sql.Types.VARCHAR);
ResultSet rs = cStmt.executeQuery();

When I run this I get: java.sql.SQLException: ORA-01006: bind variable does not exist.

If I take away the last two registerOutParameter calls I get there error:
java.sql.SQLException: ORA-00900: invalid SQL statement

After searching on the internet I don't see complete consistency on how to do this - I guess one question is in terms of the output -- In theory -- since I am going to get one resultSet with 2 columns of values what do I need to 'registerOutParameter' all 3 or just the resultSet or what?

Many Thanks
Hi,

Which collection should I use (and I am limited to java 1.4) which will support my requirement -

I need map functionality it that I need to be able to get a boolean return if a given key is already in the map PLUS I need to then get the index of that key (I need to be able to determine the order the items were put into the map sequentially) - so Hashmap, for instance, has my first criteria, but I don't know about the second?

Many Thanks
16 years ago
This was just something stupid - I was setting the label rather than the value explictly so that is why it wasn't working.
16 years ago
Hi,

I am working on an application where we must use struts 1.0 (and it's my first time with 1.0 as all my other experience is beyond this version). So when I am using <html:select tag it is not behaving like it did in later version -- my code is:

<html:select property="selectedCourse">
<bean efine id="courses" name="myForm"
property="courses" type="java.util.Collection"/>
<html ptions collection="courses" property="value"
labelProperty="label"/>
</html:select>

I have the selectedCourse property set explicity in the form to a specific value (that is not the first in the sequence), so I am expecting that value to be selected automatically when displayed (no additional code required as has worked for me in later version of struts), but this is not happening - the selected item as displayed is simply the first in the options list. So is this a struts 1.0 limitation or am I just overlooking something?

Many Thanks
16 years ago
I want to call a struts action from Javacript -- anyone have any code samples?

Many Thanks
16 years ago