Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generic data class
Message
De
16/01/2006 18:18:19
 
 
À
16/01/2006 18:05:04
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
01087043
Message ID:
01087370
Vues:
9
>I think all you have to do is use the .ToString for the Key:
>
>                While loDictionaryEnumerator.MoveNext
>                    oParameters2.Add(New OleDbParameter(loDictionaryEnumerator.Key.ToString(), loDictionaryEnumerator.Value))
>                End While
>
>Have you tried this?

Oh WOW! I never thought about that. This is working. I can now do this:
        Dim loDataProvider As Framework.Data = New Framework.Data
        loDataProvider.oParameters.Add("@Result", "String")
        loDataProvider.oParameters.Add("@AddUser", 2)
        If loDataProvider.SQLExec("SELECT * FROM WebService WHERE Result=? AND AddUser=?", _
         Framework.App.aConnection(1)) = False Then
            Exit Sub
        End If
I only have to adjust a few locations in some projects where I was passing a parameter to remove the provider specific syntax and use this generic approach.

Thanks a lot
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform