Mega Code Archive

 
Categories / Delphi / ADO Database
 

What does the error token not found

Question: I have a TQuery and TDataSource. In the TStrings property of the TQuery I have 'SELECT * FROM dbo.AnyTable' where dbo is the database on my SQL server. When I set active to TRUE I get the error: 'Token not found. Token :dbo. line number:1'. What's wrong? Answer: If the RequestLive property is set to true, then enclose the owner and tables names in quotes: Ex: SELECT * FROM "dbo.table" If request live is false, don't use quotes. Ex: SELECT * FROM dbo.table