Microsoft KB Archive/185646

= BUG: UserConnection Designer and Parameterized Query in Access =

Article ID: 185646

Article Last Modified on 1/8/2003

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q185646



SYMPTOMS
The UserConnection Designer lists parameterized queries in Microsoft Access as stored procedures; if you define the query object based on a stored procedure and select one, on the Parameters tab, every single column is displayed in the query as a parameter along with the actual parameter(s). Clicking any parameter results in the following error:

"Not a valid name for a parameter."



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
 In Control Panel, double-click the 32bit ODBC icon. In the ODBC Data Source Administrator dialog box, create a data source name, MyAccessTest, using Microsoft Access Driver and pointing to the Microsoft Access sample database Nwind.mdb. Start a new project in Visual Basic and choose Standard EXE. Form1 is created by default. On the Project menu, click Components, click the Designers tab, and then select Microsoft UserConnection. On the Project menu, click Add ActiveX Designer, and then click Microsoft UserConnection. This action brings up the UserConnection1 Properties dialog box. On the Connection tab, click Use ODBC Datasource, and select the new DSN, MyAccessTest. Click OK to save this information, and return to the Designers window.</li> Insert a new query by right-clicking UserConnection1 and choosing Insert Query or by clicking the Insert Query toolbar icon. Query1 is created by default.</li>  From the Source of Query, choose Based on Stored Procedure. Click the drop-down combo box; you see the following three queries: <pre class="fixed_text">     Employee Sales by Country Invoices Filter Sales by Year

</li> Select any of them, and click the Parameters tab. All of columns in the query are listed in the Parameters list box. Clicking any one of them results in the following error:

Not a valid name for a parameter

</li></ol>

Additional query words: kbDSupport kbdse kbODBC kbVBp500 kbVBp600 kbVBp

Keywords: kbbug KB185646

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.