Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored Procedures and Private Datasessions
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00148402
Message ID:
00149264
Views:
32
>>I think the trigger fires with INSERT INTO but you have to be careful what you are inserting. If you are setting something like a unique primary key the INSERT INTO will err because INSERT INTO has already violated the uniqueness of the field, if, it is not specified in the VALUES list or a memvar. INSERT INTO puts a null value anywhere VALUES is not specified for a field. This why I continue to generate index keys with a global routine .vs a stored procedure.
>>
>
>More missinformation...
>
>I have a file with an ID key that has a default value of newid()... function NEWID is a stored procedure...
>
>I do...
>
>INSERT INTO EEMAST (empnum) values ('12345')
>
>And, after the insert I look around... I find that the ID field has the next id value in it, and my audit log function, called from the trigger, has logged the inserti, including the key value from id.
>
>BOb

Is the ID unique or is it set to not accept null values?

Eric
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform