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
Titre:
IDbDataParameters
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01138264
Message ID:
01138264
Vues:
59
I have a query in my business object that accepts as parameters the values passed from two drop down lists. The corresponding values in the table are integers. When I try to use IDbDataParameters (code that is commented out), I get an error "missing operand". If I just create the command string, it works correctly. What am I doing wrong?

I have used the IDbDataParameters successfully when the table values are strings. Could the problem be related to the fact that the table values are integers?

Thanks.

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);
            
            // Query without IDbDataParameters
            this.GetDataSet("SELECT * FROM Personnel WHERE Category = " + category + " AND Diocese = " + dId);  

            return this.DataSet.Tables[this.TableName];
Linda Harmes
HiBit Technologies, Inc.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform