Bill, this was too simple to see.

# Thread: Bill, this was too simple to see.

1. Senior Member
Join Date
Dec 1969
Posts
6,476

## Bill, this was too simple to see.

2. Senior Member
Join Date
Dec 1969
Posts
96,118

## Sorry...still don't see it...

Suppose you had <BR><BR>ReplyID(Autonum), PostPosition<BR>987, 132, Add the ID to the end = 132.987<BR>992, 132.987, Add the ID to the end = 132.987.992<BR>1008, 132.987, Add the ID to the end = 132.987.1008<BR>&#039;lets go back and reply to the very first post again.<BR>1004, 132, Add the ID to the end = 132.1004<BR>9975, 132.1004, Add the ID to the end = 132.1004.9975<BR>&#039; and a reply to 1008<BR>10175, 132.987.1008, Add the ID to the end = 132.987.1008.10175<BR><BR>True order by becomes<BR>for postID: p.postPosition+&#039;.&#039;+CStr(postID)<BR><BR>1004: 132.1004<BR>9975: 132.1004.9975<BR>987: 132.987<BR>992: 132.987.992<BR>1008: 132.987.1008<BR>10175: 132.987.1008.10175<BR><BR>OUT OF CORRECT SEQUENCE!<BR><BR>It works maybe 95% (or more??) of the time. But...anytime you roll over (from 9 to 10, from 99 to 100, from 999 to 1000, etc.) you can be screwed up.<BR><BR>Care to try explaining again???<BR><BR>Did I miss something?<BR><BR>

3. Senior Member
Join Date
Dec 1969
Posts
96,118

## Oops! Even missed one!

1004: 132.1004<BR>9975: 132.1004.9975<BR>987: 132.987<BR>1008: 132.987.1008<BR>10175: 132.987.1008.10175<BR>992: 132.987.992<BR><BR><BR>

4. Senior Member
Join Date
Dec 1969
Posts
6,476

## RE: Oops! Even missed one!

Ahhhh, because your dealing with a string, it compares/sorts 1 caracter at a time...<BR>so for string values<BR>&#039;34&#039;<BR>&#039;1999992&#039; &#060;&#060;Would be 1st in the order...<BR><BR>But,<BR>This would happen less on greater numbers/strings.<BR>if you start forum off with an id of &#039;10000&#039;<BR>then this should only bugger things up when crossing over the 100,000 mark right?<BR>or starting at &#039;100,000&#039;<BR>then when crossing the 1,000,000 mark?<BR><BR>but you are right.<BR>Unless there is something Atrax didnt tell/show us, there is a flaw from the looks of it.<BR><BR><BR><BR>

5. Senior Member
Join Date
Dec 1969
Posts
96,118

## EXACTLY!

In fact, in one of my posts in SQLTeam.com, I even suggested that, if you didn&#039;t mind giving up some "space" in your available numbers, you could do the padding by just adding 10000 or 100000 or whatever to the msgid!<BR><BR>But how hard is it to zero-pad, instead? Trivial:<BR><BR> thisMsgFullID = replyToMsgFullID & "." & Right("00000" & thisMsgID, 5 )<BR><BR>Bingo.<BR><BR>Anyway, Atrax emailed me his complete system (DB and all), so if I get time this weekend I&#039;ll go in and enter some dummy messages with numbers that "roll over" and see if, indeed, he *can* handle them. I betting against him, but we&#039;ll see.<BR><BR>

6. Senior Member
Join Date
Dec 1969
Posts
6,476

## RE: EXACTLY!

Yes that zero pad should work.<BR><BR>If you think of it can you let me know how your test works out please?<BR><BR>If it does I&#039;ll redo my board design...<BR>Maybe ill redo it anyways and look at zero padding...<BR>Other way would work better if it does work imo.<BR><BR>Thanks <BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•