I always use GUIDs as primary keys on my tables. It's amazing how many problems they solve. In SC8 I have a table that I want my "app" to generate it's own GUID for my OBJ_GUID primary key field, just before doing an INSERT. How can I accomplish this? I've set the field to DB Insert Value "Autoincrement - Manual". I'm assuming I'm supposed to do something in the "Events - onBeforeInsert", but I can't find a sc_macro to generate a GUID. Please tell me what to do and give me a code snippet. Those help a lot. Thanks in advance. (That word "increment" scares me...as if it's expecting me to generate an integer).....(I would rather start smoking cigarettes and ruin my health before building another table with an Integer primary key)
No announcement yet.
GUID primary key on INSERT