dcsimg
How can I insert Strings using prep Stmt?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Fabio_Costa
Posted On:   Friday, May 10, 2002 09:44 AM

When I try to insert a string into the Db using preparedStatement i get the data stored with lots of spaces like the example below:


when i use this:

pstm.setString(1, "ABCDEF");


in the database i get this:

"ABCDEF   "


What can be possibly happening?


Thnx

Re: How can I insert Strings using prep Stmt?

Posted By:   AlessandroA_Garbagnati  
Posted On:   Friday, May 10, 2002 10:14 AM

Ciao Fabio,

Probably the type of the field you are trying to set is a CHAR instead of a VARCHAR?
About | Sitemap | Contact