Home > Back-end >  Public transportation station of query SQL statements, there are any errors, please warrior!
Public transportation station of query SQL statements, there are any errors, please warrior!

Time:10-22

SQL=_T (" select distinct a.r oute from
(select the route, zhandianpoistion as begin_station from
The route where zhandian=') + m_zhandian1. TrimRight () + _T (" ") +
A inner join (select the route, zhandianpoistion as end_station
The from the route where zhandian=') + m_zhandian2. TrimRight () + _T (" ") +
B on a.r oute=b.r oute
Where begin_station & lt; End_station ");

Error: error C2001: constants of line breaks

Error C2001: constants of line breaks

Error C2001: constants of line breaks

Error C2001: constants of line breaks

Fatal error C1057: an unexpected end of file encountered in the macro expansion

CodePudding user response:

Help you top it, not in c to SQL, quotes so much does not affect?

CodePudding user response:

Thank you, have no influence, top

CodePudding user response:

Run it in the debugger, all SQL statements into the SQL string, and then into the database query analyzer, analysis to see what's the problem,

CodePudding user response:

Can be used in a SQL query analyzer, but is constant, not by value can be found out, but is a variable in the code, (m_zhandian1 and m_zhandian2 are incoming variables, are the two input by the customer site name)
This is to use VS2005 debugging tip error, using vc + + language, I this is doing graduate design, time was about to reply, help to solve, grateful,
Thank you very much!!

CodePudding user response:

This.. BCB is...

To vs don't understand.. But. Even after an error to SQL should also be in connection to the database after the OPEN/EXECSQL complains. Otherwise is to write the SQL statement itself cohesion. Depends on the string to grammar together..

If it is after the OPEN/EXECSQL error, can be in the OPEN before/EXECSQL breakpoints view in the SQL string, take out to run in the SQL profiler.

If the above two no problem.. I think, no matter who calls should be no problem.
  • Related