INF: Handling sp_server_info Language Events in ODS Apps

Last reviewed: April 29, 1997
Article ID: Q117859

The information in this article applies to:
  • Microsoft SQL Server, version 4.2

SUMMARY

Microsoft SQL Server DB-Library (DB-Lib) clients use ANSI-to-OEM conversion if the DB-Library option DBANSItoOEM is set using dbsetopt() or if the "Automatic Ansi to OEM" option is set using the Client Configuration Utility. When connecting, a DB-Library client using ANSI-to-OEM conversion determines which character set is in use at the server by issuing the query "exec sp_server_info 18" against the server.

SQL Server for Windows NT uses DB-Library to issue RPC requests to remote servers. Thus, if the "Automatic Ansi to OEM" option is set on the computer running SQL Server for Windows NT, the SQL Server (as the DB-Library client) issues the "exec sp_server_info 18" language request when issuing an RPC to a remote server. This can cause unexpected language events to be triggered in Open Data Services (ODS) servers accepting RPC requests from NT SQL Servers.

MORE INFORMATION

If the ODS server is configured to accept language events, the "exec sp_server_info 18" language request can be safely ignored by using the following code fragment:

   #define SERVER_INFO_QUERY   "exec sp_server_info 18"
   query = srv_langptr(srvproc);

   if (!strncmp(query, SERVER_INFO_QUERY, strlen(SERVER_INFO_QUERY)))

           srv_senddone(srvproc, SRV_DONE_FINAL, 0, 0);
   }

This causes the DB-Library client to perform data conversions under the assumption that the ODS server is NOT using the ANSI codepage.

In order to keep this query from being sent by SQL Server for Windows NT and other Windows NT DB-Library applications, start the SQL Client Configuration Utility and ensure that the "Automatic Ansi to OEM" checkbox is cleared.


Additional query words: Windows NT oemtoansi ansitooem
Keywords : kbinterop kbtool SSrvGen SSrvODS
Version : 4.2
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.