• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DB question: URLyBird...catches the SCJD!!

 
Michael Vargenstien
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

The original chow yun phat is back. I have purchased the real deal exam. No more demos, no more books, all hard core SCJD baby. So here's the deal, according to the requirements, its states the following:

2 byte flag. 00 implies valid record, 0x8000 implies deleted record. Record containing fields in order specified in schema section, no separators between fields, each field fixed length at maximum specified in schema information


But here's the deal sun, a short is out of range!!! How are you supposed to write to the database a 2 byte value if that value technically overflows? Am I missing something?

Thanks for any input!!
 
Maurizio Nagni
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Michael,

1 byte ---> 8-bit (signed) ----> -128 to 127
BUT in hexadecimal is from 0x00 to 0xFF

consequently because you have 2 bytes your range, in exadecimal goes from
0x0000 to 0xFFFF, and consequently the range from your assignment (0x8000) is correct.
 
Michael Vargenstien
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maurizio. You dah man. Thanks!! One beer for you.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic