The information in this article applies to:
SYMPTOMS
After upgrading from version 1.x to 4.2, an application or stored
procedure that uses the system function host_name() to insert a value
into a row generates the following error message (error 515):
CAUSEThe system function host_name() has changed behavior between version 1.x and 4.2. The host_name() function is supposed to return the value that was set by the front-end application by calling DBSETLHOST. If this was not set by the application, the return value depends on the version of the SQL Server; version 1.x returns a string of 30 spaces, and version 4.2 returns a NULL value. RESOLUTIONThere are several ways to address this situation. The application could be changed to call DBSETLHOST to provide a value. Secondly, the column that is used to store the host_name could be changed to allow NULLs, or, in the case of a stored procedure, the ISNULL function could be used to provide a value when host_name returns NULL. Additional query words: DB-Lib DB-Library dblib 4.2 4.2a
Keywords : kbother SSrvServer |
Last Reviewed: March 17, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |