Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with CommandText Property in Data Environment
Message
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
Problem with CommandText Property in Data Environment
Miscellaneous
Thread ID:
00404552
Message ID:
00404552
Views:
60
I am trying to set the command text of a dataenvironment command at run time and am haveing a problem that I have not experienced before. ie.

I set the SQL string to the commandtext property
strSQL = "SHAPE {SELECT * FROM viewEmployees ORDER BY LastName}  AS sqlEmployees APPEND ({SELECT * FROM `viewRequests`}  AS sqlRequests RELATE 'ID' TO 'EmployeeID') AS sqlRequests"
DataEnv.Commands.Item("sqlEmployees").CommandText = strSQL
'Run the new command
DataEnv.sqlEmployees
This is where the error appears.
It says Invalid syntax in from clause.
The reason it says this is b/c for some reason if I display the commandtext property in the debug window it reads



select * from SHAPE {SELECT * FROM viewEmployees ORDER BY LastName} AS sqlEmployees APPEND ({SELECT * FROM `viewRequests`} AS sqlRequests RELATE 'ID' TO 'EmployeeID') AS sqlRequests


Why is that "select * from " appear? It never used to but now it does?!?!?!







Next
Reply
Map
View

Click here to load this message in the networking platform