An exception of class DatabaseException was not handled. The application must shut down.
Exception Message: near “select”: syntax error
Exception Error Number: 1
Typically when I run into this error I figure out a different way to solve the problem. In this particular case I’d like to find - if possible - the proper solution to letting sql answer the query instead of me coding around the error message.
No invisible characters. I’m able to take the code that xojo generates and directly run it inside of SQLiteSutdio with no issues - but it fails inside xojo.
This can happen if a comma “,” or a dot “.” is wrong or missing or many other ways.
I’m able to take the code that xojo generates and directly run it inside of SQLiteSutdio with no issues - but it fails inside xojo.
Since you say the query works here but not there, it sounds like there are some characters in the string that should not be there (as @Kem_Tekinay suggests).
Otherwise i suggest you post the actual query here, including your code that runs the query
Your code has invisible characters that Xojo can’t process. Some SQLite apps add that invisible character so when you copy/paste from those apps you will have those in your code.
I did try running the code through different sqlite interfaces and it worked each time. Only when I put that same code in XOJO did it fail. I re-hand coded it this morning line for line and it worked.
That’s a bit embarrassing.
In the windows environment since the '80’s I’ve used a tool called vedit to show me invisible characters. Written in assembler, it’s very fast, and has a great feature that allows me to toggle between six different display modes using ‘Alt-D’. The modes I use most are ASCII, ASCII-Exended, HEX. In my mac I haven’t been able to find such a tool. I would love any suggestions.
or perhaps I could write my own - I keep saying that for like ten years but never get to it.
Yes sorry. I did see that suggestion and I did highlight and clean the characters but obviously I did not do that correctly. I’ll use that feature more heavy handedly now. Thanks.
If you didn’t select all code and you started with select, then the invisible character was not selected. You need to select from the quote " at least, but is better to use Select All and then clean invisible ascii characters.
I need to really thank everyone. Kem said the answer but I was in such a hurry I missed a lot. With AlbertoD’s step by step demonstration I could clearly see what I was missing. I agree whole-heartedly that gremlins should display by default. Thanks again.