FIX: Stored Procedure Used with SQLEXEC Embeds NULL as Last Character

Article translations Article translations
Article ID: 279135 - View products that this article applies to.
This article was previously published under Q279135
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page

SYMPTOMS

When you use the SQLEXEC command to call a stored procedure from Visual FoxPro, a NULL (CHR(0)) may be added to the end of the fields in the resulting cursor.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in the next service pack for Visual Studio 6.0.

For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:
194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That a Visual Studio Service Pack Is Installed
To download the latest Visual Studio service pack, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx

MORE INFORMATION

Steps to Reproduce Problem

  1. In Visual FoxPro, run the following code from the Command window.NOTE: You need to provide the actual servername, user ID, and password for your installation of Microsoft SQL Server and ensure that the user has the appropriate permissions.
    ?SQLSTRINGCONNECT("Driver=SQL Server; Server=servername;uid=UserName;pwd=StrongPassword;")
    ?SQLEXEC(1, "sp_who")
    BROWSE
    In the Browse window, you may see a box or other ASCII character at the end of the status field, depending on the font that is used by the window.

  2. Close the Browse window.
  3. In the Command window, type the following:
    ? ASC(SUBSTR(status,LEN(status),1))
    					
    The Visual FoxPro command has embedded a NULL (CHR(0)) as the last character in the status field.

Properties

Article ID: 279135 - Last Review: October 21, 2013 - Revision: 2.2
APPLIES TO
  • Microsoft Visual FoxPro 6.0 Professional Edition
Keywords: 
kbnosurvey kbarchive kbbug kbcodesnippet kbdatabase kbfix kbvfp600fix kbvs600sp5fix KB279135

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com