K
Kevin
I'm making my first attempt to put embedded
SQL in a visual C++ application and I'm
having trouble getting aliases to work.
If I try the following SQL query on MS SQL 7.0
it works fine.
SELECT MTI.Mesh_Window_ID Window_ID FROM
Mesh_Transform_Indices MTI
WHERE MTI.Mesh_Window_ID = 200
If I run the same query from visual C++ 6.0
clicking on a data view and the appropriate
database and choosing 'run' from the right
mouse button menu, I get the following error :
Syntax error (missing operator) in query expression 'MTI.Mesh_Window_ID Window_ID'
if I remove the Window_ID alias, thus
SELECT MTI.Mesh_Window_ID FROM
Mesh_Transform_Indices MTI
WHERE MTI.Mesh_Window_ID = 200
it runs. If I embed this query in C++ and try it using
CDaoQueryDef, CDaoRecordset I get the same behaviour.
As far as I know this is standard SQL. Is there some
limitation on SQL when putting it in Visual C++ code ?
Thanks for any advice
Kevin
SQL in a visual C++ application and I'm
having trouble getting aliases to work.
If I try the following SQL query on MS SQL 7.0
it works fine.
SELECT MTI.Mesh_Window_ID Window_ID FROM
Mesh_Transform_Indices MTI
WHERE MTI.Mesh_Window_ID = 200
If I run the same query from visual C++ 6.0
clicking on a data view and the appropriate
database and choosing 'run' from the right
mouse button menu, I get the following error :
Syntax error (missing operator) in query expression 'MTI.Mesh_Window_ID Window_ID'
if I remove the Window_ID alias, thus
SELECT MTI.Mesh_Window_ID FROM
Mesh_Transform_Indices MTI
WHERE MTI.Mesh_Window_ID = 200
it runs. If I embed this query in C++ and try it using
CDaoQueryDef, CDaoRecordset I get the same behaviour.
As far as I know this is standard SQL. Is there some
limitation on SQL when putting it in Visual C++ code ?
Thanks for any advice
Kevin