-
Can anyone help,
I have set up a command object in a data environment with three parameters, I have made two parameters required and the other optional but when I call the command object with only the two required parameters I get and error message Argument is not optional.
Please Help,
Chris
-
<?>
what are the parameters and the call you are having
trouble with?
-
Parameters
I have a select statment
Select Depot_ID , Start_Date from tblDepot where start_date >= ? and start_date <= ? and Depot_ID =?
where the Deport_ID=? is the opitional parameter (Require = false, in the parameter tab of the command object). When I run the command from the data environment it ask me for the three parameters if I leave the third parameter blank it returns no records.
If I run the command object from code without the third parameter.
dataenvironment.command1 01/01/2000, 01/01/2004
I get a complile error,
Argument not optional.
Thanks for any help,
Chris
-
<?>
this is just a guess but in some funcitons,if the paramater
is optional you still have to pass something..ie
null value or 0...
Worth a try..
Wish I could be of more help but this is all I can think of
as I haven't played in that area.