Hi
We have set up GSA features with several database properties linked to MSSQL.
I would like to know is when you select and delete a feature (which deletes a database entry directly without the ability to undo) is there some mechanism by which a prompt to warn a user (with confirmation) about the delete can appear?
Stewart;
Since Bentley Map is buit on top of Microstation and uses Microstation manipulation tools for most of the feature manipulations ( move, copy, rotate, scale, delete, etc.), then the feature delete is handled by Microstation. Though Bentley Map does have hooks into the Micrstation delete functionality, to handle sub-features ( Feature Propigation functionality) it makes no attempt to issue a user confirmation on the delete functionality. Your siuation might warrnt a confirmation, but there are many different variations on this ( fence, selection set, individual elements, API, database restrictions) that it would be hard to just turn on a switch and make it work all the time ( there is no confirmation in Microstation either for elements with database linkages).
There are a couple of ways to handle this.
1. On the database side restrict the user from deleting records in the schema. Thus only certain users are allowed to delete features. The rest can not. SQL Server should be able to handle this.
2. Write a VBA wrapper, for your situation, to handle the confirmation before the delete. Look at the element location class in VBA (ILocateCommandEvents) . There should be examples for your use.