简体   繁体   中英

Query error SQL Compact Edition 3.5

In my solution I have a local database and a database connect class with a GetQuery function. This function works good but for some reason, it won't handle the query as shown below. When I run a query like SELECT * FROM logs everything works out, but when I try to use this query instead

SELECT klantnr AS 'Klantnummer', 
       klantnaam AS 'Klantnaam', 
       vraag AS 'Vraag/probleem',
       informatie AS 'Informatie/uitvoering', 
       antwoord AS 'Antwoord/oplossing', 
       datum AS 'Datum', 
       tijd AS 'Tijd' 
FROM logs 

I get the following error message: There was an error parsing the query. [ Token line number = 1,Token line offset = 21,Token in error = Klantnummer ] There was an error parsing the query. [ Token line number = 1,Token line offset = 21,Token in error = Klantnummer ]

Please try this:

SELECT klantnr AS [Klantnummer], 
       klantnaam AS [Klantnaam], 
       vraag AS [Vraag/probleem],
       informatie AS [Informatie/uitvoering], 
       antwoord AS [Antwoord/oplossing], 
       datum AS [Datum], 
       tijd AS [Tijd] 
FROM logs 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM