Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with CommandText Property in Data Environment
Message
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Problem with CommandText Property in Data Environment
Divers
Thread ID:
00404552
Message ID:
00404552
Vues:
61
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?!?!?!







Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform