Tech Tip: How to clear Database Mehods
PRODUCT: 4D | VERSION: 12.3 | PLATFORM: Mac & Win
Published On: March 1, 2012
Occasionally the occasion will arise to remove any code that has been entered into one or more of 4Ds Database Methods. In many cases it is not enough to simply delete the code from the Database Method.
Five of the Database Methods expect a return value in the parameter $0;
- On Web Connection Database Method
- On Web Authentication Database Method
- On Backup Startup Database Method
- On Server Open Connection Database Method
- On SQL Authentication Database Method
Simply deleting the code from one of these methods is insufficient. Once code has been entered in one of these methods 4D will expect the $0 parameter to be returned. To break this expectation from 4D, the reference 4D maintains to the preexisting code has to be deleted. To do this the database mehtod must be selected, the "Minus" button clicked, and the "Trash" emptied.
This will not remove the Database Method from the list of Database Methods in the explorer window, shown below. It will however remove the internal reference 4D maintained to the code that had been previously entered for that Database Method.
![](https://kb.4d.com:443/kbase/assets/images/76461-1.jpg)