SQL select
Posted: Tue Aug 16, 2022 1:36 pm
Hello, I´m trying run SQL select in javascript. (in Switch scripter)
I can do:
1. connect to database
2. update sql command
3. read log if the sql command was succesfull
But I can not get a result from simple "SELECT * from table" sql command (value from table)
For example this script:
I can do:
1. connect to database
2. update sql command
3. read log if the sql command was succesfull
But I can not get a result from simple "SELECT * from table" sql command (value from table)
For example this script:
Code: Select all
var SQL = new DataSource();
var dbo = SQL.connect('SQL19','user','pass');
s.log (1, "OK DB: "+ dbo);
var FStatement = new Statement( SQL);
var SQLcommand = "SELECT * FROM table WHERE job='111111'";
isSucces = FStatement.execute(SQLcommand);
s.log (1, "Command status: "+ isSucces);