Any thoughts on the best way to generate a unique Id for records in a daily log table. I would like to try and be efficient if possible and fit this into an Integer field. These log tables would probably be free tables not part of a database.
I firstly looked at having 8 bytes for the date + 8 bytes for the milliseconds past midnight but that gives me a value 16 digits long, much longer than the 10 digits of an Integer field. Also considered SYS(3) or SYS(20015) but don't know if either of them can be relied on to be completely unique. In this case the app is triggered as a COM object by incoming email in Exchange, I can't guarantee that there will never be two instances running at the same time. Next idea is an Auto-incrementing Integer field but starting from a different base each day, say two bytes binary for the day and two for the counter. Problem here might be if there was ever a fault and a second log file for the same day was created. What do you suggest is the best way to deal with this? _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/!&!aaaaaaaaaaayaaaaaaaaaoo2khh5xw1oq9etmzh8uaqijqaaeaaaaczadjjcmhdcvntobpvpnx4baaaaa...@associateddata.co.uk ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

