BUG: UserConnection Designer and Parameterized Query in Access
ID: Q185646
|
The information in this article applies to:
-
Microsoft Visual Basic Enterprise Edition for Windows, versions 5.0, 6.0
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.
MORE INFORMATIONSteps 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.
- 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.
- From the Source of Query, choose Based on Stored Procedure. Click the
drop-down combo box; you see the following three queries:
Employee Sales by Country
Invoices Filter
Sales by Year
- 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
Additional query words:
kbDSupport kbdse kbODBC kbVBp500 kbVBp600 kbVBp
Keywords : kbGrpVBDB
Version :
Platform : WINDOWS
Issue type : kbbug
|