So, whenever a completely new message is created it creates a record in both Messages and Threads. When subsequent messages are made in the thread those just add records to Messages and use the existing ThreadID. Then you just have to sort messages by DateCreated to get them all in order.
plog, would you mind clarifying this please?
When a new record is inserted, the program will add the new line to 'Messages', but if 'ThreadID' is a foreign key, won't this line need to be added beforehand?
If so, will I then need to use @@Identity to get the ThreadID from 'Threads' to add into the 'ThreadID' field in 'Messages'?
Lastly, for subsequent messages, how will they link to the correct ThreadID?
Sorry if I'm missing something - just want to be sure rather than copy and paste without knowing what I'm doing!
I understand if this is you right now plog: :banghead: