Results 1 to 4 of 4

Thread: Help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Location
    Glasgow, Scotland
    Posts
    71
    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

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    what are the parameters and the call you are having
    trouble with?
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Location
    Glasgow, Scotland
    Posts
    71

    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



  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    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.

    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width