If you are connecting to your database's SQL Server from an outside source, the On SQL Authentication database method is called, if it exists. In that case it must return True in the $0 parameter, or you will receive an error and be unable to connect.
This is normally an obvious situation and the intended behavior, but for developers who use 4D's User and Password system for access, the On SQL Authentication method is unnecessary. In this case it must not exist. Sometimes the On SQL Authentication can be accidentally created and left blank. This is easy to overlook. The following two screenshots show examples of the difference between a blank On SQL Authentication method and a non-existent one:
No On SQL Authentication Method (the desired state):
Blank On SQL Authentication Method (a state that may lead to errors):
Some of the errors you might see if you have a blank On SQL Authentication method are Error 9900 (Server rejected the connection) or Error 9917 (Generic SQL Error).