Remove Database Icon

Hello All,

I’ve searched the forum pretty throughly and cannot find a solution to my issue. I am trying to write code that will remove an icon from the users workspace ONLY if it exists. My issue with the code below is that it works if the icon is there but if it isnt there it tries to remove the workspace TAB instead…

@Command([FileOpenDatabase]; “”; “Test.nsf”);

@Command([WindowWorkspace]);

@PostedCommand([FileDatabaseRemove])

ANy alternate suggestions would be appreciated. Thanks in advance

Subject: must “add” the database first in order to programmatically get a handle to it, before removing.

As an alternative, you can try this code. It’s transparent that when you add the database to the workspace, it will be immediately removed as well.

@Command([AddDatabase]; “Server Name”:“DBname.nsf”);

@Command([WindowWorkspace]);

@Command([FileDatabaseRemove]);