|
|
|
| ||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Uppercase A String
Hello,
I was wondering how can I get the variable string return as an UPPERCASE string. I have tried using this sql statement but can't get the variable to print out as all UPPERCASE string. I am trying to display the variable in an input field in a form. Would appreciate the input. Thanks! String sql = "Select switch_id, UPPER(make), UPPER(model), UPPER(version), service_date, cost, mark from switch "; String Model = rset.getString("model") |
|
#2
|
||||
|
||||
|
Using the column name for the getString method may be affecting it. Try using the column index instead:
Code:
String Model = rset.getString(3); |
|
#3
|
|||
|
|||
|
Or just do it in Java instead of SQL:
Code:
String Model = rset.getString( "model" ).toUpperCase(); |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Uppercase A String |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|