Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

null terminated text values in the DB?

 
Xabier Martija
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In my assignments instructions i have read this:


but what i found in the DB is that all the text values don't end with "null" values. They end with 0x20 (blanks) values until end of value length.

I expected they sould end with 0x00 values. That's what i think a "null" value sould look like.Am i wrong?

Actually i create a StringBuffer this way and the default value for byte is 0x00:



Could someone help me?
 
John Stone
Ranch Hand
Posts: 332
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is common problem. Make a note in choices.txt and decide whether you will use spaces or nulls and document that decision as well.
 
Xabier Martija
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
I will document it in my choices.txt.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic