Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with mmPicker and DataCommandType.StoredProcedur
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
00999745
Message ID:
01001191
Vues:
36
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform