Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IDbDataParameters
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
IDbDataParameters
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01138264
Message ID:
01138264
Views:
58
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.
Next
Reply
Map
View

Click here to load this message in the networking platform