Microsoft KB Archive/166674

= BUG: Reserved Error when Entering Certain Valid SQL Statements =

Article ID: 166674

Article Last Modified on 5/2/2006

-

APPLIES TO


 * Microsoft Visual InterDev 1.0 Standard Edition

-



This article was previously published under Q166674



SYMPTOMS
When using the DataForm wizard and selecting a SQL statement as a recordset type in step 2, if you enter a statement that selects more than two fields with the same name, either from a view or by multiple table selection, the DataForm wizard prompts a reserved error.



CAUSE
The problem is with the error handling in the wizard framework.



RESOLUTION
The workaround for this problem is to alias the second occurrence of the duplicate field names within the SQL statement. For example, "select authors.city, stores.city town from authors, stores" works, but the SQL statement below does not.



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



Steps to Reproduce Behavior
 Open a project. Insert a dataconnection to pubs. From the File menu, select New, File Wizards, then Data Form Wizard. In step 1 of the Wizard, select the connection to pubs. In step 2, select "SQL statement, "next."</li>  In step 3, type the following valid SQL statement: <pre class="fixed_text">     select * from authors, stores                    </li> Click Next.</li></ol>

A reserved error (-2147220496) appears, and the wizard shuts down.

<div class="references_section">