Phil
Originally posted by Higgledy Smith:
Good question. This is my retrieve declaration:
private static final String RETRIEVE_STMT = "SELECT * FROM Course WHERE semester=Winter AND courseNumber=CMIS241";
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Originally posted by Rob Prime:
Use quotes around the string literals:
"SELECT * FROM Course WHERE semester = 'Winter' AND courseNumber = 'CMIS241'"
Phil
Originally posted by Higgledy Smith:
This is Oracle 10i. The code I am running is not my code but an example from the class material (I am taking Advanced Java). When I looked at the prepared statement (SELECT) I thought the same thing about the single quotes missing but why when I run the code to query for the 1st record in the table, I get the correct result and an error when query for the 2nd record? Both queries use the same exact code, same tomcat, same everything. That, to me is messed-up!
Phil
Phil
Phil
Originally posted by Higgledy Smith:
Paul,
Normally, I too would blame my code but the code worked when the 1st record in the Course Table was selected. So why would the code work for one record and not the other?
Phil
Originally posted by Higgledy Smith:
Chris,
I tried the sql to get the sid, here is the results:
Phil
I just would start his Plan C before proceeding to Plan A --> Plan B if it were me.
Originally posted by Higgledy Smith:
Below is my prepared statement declaration and the code which sets the 2 variables. How can I see stmt query value before it is exequted? The system.out.println returns a the object's value.
Phil
Phil
<res-sharing-scope>
Optional
Specifies whether connections obtained through the given resource manager connection factory reference can be shared.
Valid values:
* Shareable
* Unshareable
Phil
Phil