SQLOpen May Not Be Able to Connect to Oracle Databases

Last reviewed: September 2, 1997
Article ID: Q135007
The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c

SYMPTOMS

If you use the SQLOpen macro function in a Visual Basic procedure, you may be unable to connect to an Oracle 7.0 database and you may receive the following error message:

   S1000
   12154
   [Oracle][Oracle ODBC Driver][Oracle OCI]ORA-12154: TNS: could not
   resolve database name.

CAUSE

This problem occurs when you run the SQLOpen function in a Visual Basic procedure while there are several workbooks open in Microsoft Excel. Open workbooks include add-ins, hidden files, Personal.xls, Xl5galry.xls, and any other files opened from the Xlstart folder.

RESOLUTION

To avoid this problem, close any other open workbooks, and delete any unneeded worksheets within the workbook that contains the procedure before you run the procedure.

Additionally, you may need to close other applications that are running, and take standard troubleshooting steps to make more memory available.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

REFERENCES

For more information about the SQLOpen Function, choose the Search button in the Visual Basic Reference and type:

   SQLOpen Function


Additional query words: xlodbc.xla msquery
Keywords : kbprg ODBCGen xlquery xlwin
Version : 5.00 5.00c
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: September 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.