It is better to make mistakes now and on purpose than later and accidentally...
Paul Sturrock wrote:There is nothing in JDBC or SQL Server that will cause this behaviour. Are you sure of the value you are passing? Are you sure your data type is varchar and not char? How are you testing this?
It is better to make mistakes now and on purpose than later and accidentally...
Paul Sturrock wrote:OK, so you know you must be passing twenty characters of data to the database.
Paul Sturrock wrote:
What's this:
line doing?
It is better to make mistakes now and on purpose than later and accidentally...
Ulf Dittmer wrote:You could put a few System.out.println statements along the way between the code that reads the password from the GUI, and the code that writes it to the DB. That way you know what gets entered, whether it gets changed along the way, and what is passed to the DB.
It is better to make mistakes now and on purpose than later and accidentally...
Paul Sturrock wrote:Its definately not the database. VARCHAR is variable character length. If you had chosen char (fixed character length) you might see this behaviour.
It is better to make mistakes now and on purpose than later and accidentally...
Ulf Dittmer wrote:Where/how are you seeing these space characters? In other words, how did you notice they're there?
It is better to make mistakes now and on purpose than later and accidentally...
It is better to make mistakes now and on purpose than later and accidentally...
Ulf Dittmer wrote:Since you're using SQLServer, why are you using the JDBC/ODBC bridge instead of a proper type 4 driver? It's free, not buggy like the bridge, multi-thread-capable etc. etc.
It is better to make mistakes now and on purpose than later and accidentally...
Ulf Dittmer wrote:http://faq.javaranch.com/java/GeneralJdbcQuestions points you to Microsoft's own driver. jTDS is also an option.
It is better to make mistakes now and on purpose than later and accidentally...
Don't get me started about those stupid light bulbs. |