Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with mmPicker and DataCommandType.StoredProcedur
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
00999745
Message ID:
01001191
Views:
35
>The reason it's working differently for a stored procedure is because it doesn't know the nature of your stored procedure and how to filter data. With a SQL SELECT statement, an additional WHERE clause is simply added to the end of the statement. With a stored procedure, you need to set the Picker's DataCommandFilterParameterName property to the name of a parameter in your stored procedure into which a filter string can be placed. For example, you may add a "@FilterParameter" parameter to your stored procedure, and then set the Picker's DataCommandFilterParameterName property to "@FilterParameter". At run time, the picker logic sets the value of @FilterParameter to a corresponding WHERE clause (such as "CustomerName LIKE 'OAK'") and this parameter is passed to your stored procedure. Within your stored procedure you can use this filter to filter the items in the picklist.

The stored procedure isn't paramaterized. It's just a SQL SELECT with a subset of the fields in the table. I can use just a SQL SELECT in the mmDatePicker, but I use the stored procedure in other parts of the program.
Chris McCandless
Red Sky Software
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform