-
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?
-
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.