This error can also occur if the data source was not configured correctly using the ODBC driver. Refer to this documentation page for steps to set up a data source using an ODBC driver. Confirm that the connection is successful when testing the data source:
https://www.mathworks.com/help/database/ug/microsoft-sql-server-odbc-windows.html
