Title: Messaggio
I think varchar is diferent than nvarchar so when you read a varchar column is better touse the trim function.
String aString = aResultet.getString(aColumnIndex).trim();
 
regards
Rinaldo
-----Messaggio originale-----
Da: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED] Per conto di James Hicks
Inviato: mercoled� 16 luglio 2003 22.41
A: [EMAIL PROTECTED]
Oggetto: Re: Regarding Prepared Statement

Verify that the field type is varchar and not char.  If it is varchar, try changing db drivers.  The driver could be appending the empty spaces because it thinks the field is of type char.
 
James
-----Original Message-----
From: Inderjit Singh [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 16, 2003 7:49 AM
To: [EMAIL PROTECTED]
Subject: Re: Regarding Prepared Statement

Try to trim the NAME before comparisons.
 
Hope this helps
Inderjit
 
-----Original Message-----
From: K R Viju [mailto:[EMAIL PROTECTED]
Sent: Friday, July 11, 2003 2:47 PM
To: [EMAIL PROTECTED]
Subject: Regarding Prepared Statement

List,
 
We have a table called CUST.
CUST has one column called NAME Varchar (25)
When i insert a row using PREPARED STATEMENT, thou i insert a string of length 10, it adds space and inserts 25 length.
 
what cud be the problm?
am using MS SQL 2000.
 
Thanks
Viju

Reply via email to