I have the following code which works in MySQL workbench and Navicat but not in my app
var sqltext as string
sqltext="SHOW COLUMNS from "+mytable
var rs as rowset =Helicondb.SelectSQL(sqltext)
I get an exception
Exception Message: near “SHOW”: syntax error
Exception Error Number: 1
Any ideas why?
Thanks
According to MySQL 8 documentation, the code should be:
SHOW COLUMNS FROM mytable FROM mydb;
SHOW COLUMNS FROM mydb.mytable;
Either one or the other, the db name should appear.
Gilles,
thanks but same result
. I wonder if there could be a stray character in the sqltext variable. Try the command that cleans a line in the IDE. I can’t recall the name though.
The stray character is me…it’s obviously too hot for me at the moment…It works if I actually target a MySQL database and not an SQLite database… duh, sorry for the noise.
And SQL is supposed to be a standard . . .
Tim_Hare
(Tim Hare)
July 24, 2021, 11:33pm
7
This should go in the programming humor thread…