Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
You're correct, in Oracle, have to use a ":" to identify parameters... so in your example, the code would be:
OracleCommand loCommand = new OracleCommand();
//-- Create the command
loCommand.CommandText = "SELECT MAX(or_created) FROM Orders WHERE or_cust_pk = :cust_pk";
loCommand.Parameters.Add(":cust_pk", OracleType.Number);
loCommand.Parameters[":cust_pk"].Value = CustomerPK;
However, the : is only for parameterized commands... when you call a stored procedure through Oracle, you can use any unique name you want (i.e. you cannot use the same name as the columns within the table, so "P_cust_pk" would work fine.).
|