Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IDbDataParameters
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01138264
Message ID:
01138271
Vues:
11
Linda
>
>
>            // Query using parameters
>            //IDbDataParameter param1 = this.CreateParameter("@Category", category);
>            //IDbDataParameter param2 = this.CreateParameter("@Did", dId);
>            //this.GetDataSet("SELECT * FROM Personnel WHERE Category = " + param1 + " AND Diocese = " + param2);


You don't add the parameter to the SQL like that. Try this:

<pre>
this.GetDataSet("SELECT * FROM Personnel WHERE Category = @Category AND Diocese = @Did", param1, param1);
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform