KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q137408: DOC: Can’t Use ConnectName Property w/SQLGETPROP() Function

Article: Q137408
Product(s): Microsoft FoxPro
Version(s): WINDOWS:2.5,3.0
Operating System(s): 
Keyword(s): kbinterop kbdocfix kbvfp300 kbMDAC250
Last Modified: 22-FEB-2000

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Visual FoxPro for Windows, version 3.0 
- Microsoft Data Access Components version 2.5 
-------------------------------------------------------------------------------

SUMMARY
=======

Documents that ship with the Professional Edition of Microsoft Visual FoxPro
version 3.0 for Windows and the Visual FoxPro Help file incorrectly list the
ConnectName property as being available with the SQLGETPROP() function. However,
using the ConnectName property with SQLGetProp results in this error:

  Incorrect Property Name

The ConnectName property can be used with the CURSORGETPROP() function to return
the result that would be expected with the SQLGETPROP() function.


MORE INFORMATION
================

Steps to Reproduce Behavior
---------------------------

1. Use the ODBC Administrator to establish a data source, and assign it a name.
  One of the tables within Testdata.dbc can be copied to a type FOX2X to be
  used in this example as follows:

     USE C:\Vf\Samples\Data\Customer.dbf
     COPY TO odbctest TYPE FOX2X

2. After the data source has been set up with the ODBC Administrator, create and
  run a program containing this code:

     handle=SQLConnect("<Data_Source_Name>")
     =SQLExec(handle,"USE odbctest")
     =SQLExec(handle,"SELECT * FROM odbctest")
     ? SQLGetProp(handle,"ConnectName")       && This will produce the
                                              && error:
                                              && "Incorrect Property Name"

Additional query words: VFoxWin

======================================================================
Keywords          : kbinterop kbdocfix kbvfp300 kbMDAC250 
Technology        : kbVFPsearch kbAudDeveloper kbMDACSearch kbMDAC250 kbVFP300
Version           : WINDOWS:2.5,3.0

=============================================================================

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.

Copyright Microsoft Corporation 1986-2002.