setString for char field

  • Thread starter Edward A Thompson
  • Start date
E

Edward A Thompson

I have a field defined as a char, and want to insert that field into a
database column defined as CHAR(1).

Is there a better way than:
PreparedStatement ps;
...
...
ps.setString(j++,String.valueOf(eoc.MEASURE_CAT_CODE));
...
...
which will allocate a String object every time?
 
C

Chris Smith

Edward said:
Is there a better way than:
PreparedStatement ps;
..
..
ps.setString(j++,String.valueOf(eoc.MEASURE_CAT_CODE));
..
..
which will allocate a String object every time?

No.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top