Results 1 to 2 of 2

Thread: Syntax Error passing SQL to DataEnvironment

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    Buffalo,NY
    Posts
    8

    Post

    I am trying to pass a SQL to the DataEnvironment at run time
    ysing the Command1_click event:

    DataEnvironment1.Commands("orders").CommandText=_
    SELECT account FROM orders WHERE account="12345";

    And I get syntax error in FROM clause so I change tosee where the problem is to:
    SELECT * FROM orders
    And still get the same error what am I doing wrong?

  2. #2
    Hi,

    Unfortunately, I don't know what is DataEnvironment, but if you are going to pass a SQL string, then make sure of the following:

    - The place where you use SQL commands accepts SQL commands.
    - DataEnvironment1.Commands("orders").CommandText .. can
    accept records found by SQL command. I feel that
    CommandText is a property that accept only text (so one
    record) and not many possible records.
    - Check the quotation-marks everywhere. THIS VERY IMPORTANT.

    regards,

    Wesam.

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