Results 1 to 2 of 2

Thread: SQL in DE Command

  1. #1

    Thread Starter
    Member danperlman's Avatar
    Join Date
    Aug 2001
    Location
    Sandy, Utah
    Posts
    39

    SQL in DE Command

    Hello,

    I am trying to do a data report on the current record for the table ROS. I do not want all of the records in the table.

    FormROS.TextJobID.Text contains the ID of the record I want to report on.

    The sql statement:
    Select * from ROS where 'Job ID' = FormROS.TextJobID.Text

    Gives me the error:
    "FormROS.TextJobID.Text has no default value"

    Any ideas?

    Thanks,

    Dan

  2. #2
    Hyperactive Member
    Join Date
    Jul 2001
    Location
    FL
    Posts
    258
    In the Data Environment Command Object you are using in the General Tab of the Properties set the SQL Statement to...

    Select * from ROS where Job ID= ?

    Now go to the Parameters Tab and change anything there that needs to be set, is probably OK. You could change the parameter name to JobID

    Now add this code to your form in an appropriate place.

    DataEnvironment1.Command1 TextJobID.Text

    You will notice as you put the space after Command1, intellisense will prompt you for the parameter JobID.

    Change the names to the ones you used if you changed them from the default.

    This will now put the TextJobID.Text in your SQL staement

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