Your comments

Hi,

Any news about virtualization?

Hi Alekasandr,

Do you know when will support? We have big costumers in Brazil that only accepts virtual servers solutions.

I have to decline some projects.

Hi,

I did it yesterday with a batch file, than I create a Task Scheduler. It's working! 

First I need to keep server always working, second I have to know about the crash. This is harder.


I'm try to find a way to Windows sends me email when server crashes. 

Sorry,

But it only works on project starting? If project is opened on panel, message doesn´t update automatically.

I made a video. You can view in my code on query and on video you can see 512 rows returned.

My code:

/**************Variables Init**************************/
var now = "now";
var BaseMySQL = new ODBC("root", "123", "MySQLiridium");
var query_head = "INSERT INTO chamada_enfermagem(Posto, Leito, Tipo, Tempo, Data) VALUES(";
var info_chamada = "P2A_215_ATENDIDO_4";

IR.AddListener(IR.EVENT_START,0,function()
{
if(BaseMySQL == false)
{
IR.Log("Wrong connection");
}
else
{
IR.Log("Right connection");
}

writeDB(info_chamada)
});


function writeDB(info_chamada) //gravar informações no DB
{
if (!BaseMySQL) //if no ODBC object
{
var BaseMySQL = new ODBC("root", "123", "MySQLiridium"); // creating ODBC object
if (BaseMySQL)
{
IR.Log(BaseMySQL + " connected!");
}
}

var posto = info_chamada.split("_")[0];
var leito = info_chamada.split("_")[1];
var tipo = info_chamada.split("_")[2];
var tempo = info_chamada.split("_")[3];
var query = query_head + '"'+posto+'"' + "," + '"'+leito+'"' + "," + '"'+tipo+'"' + "," + '"'+"00"+'"' + "," + '"'+now+'"' + ");";
var response = BaseMySQL.Query(query); // SQL query to database
IR.Log(query);

}

Sintax above that you show me is for local database (https://dev.iridi.com/DB_API/en).

I used this sintax for ODBC (https://dev.iridi.com/ODBC/en)

Local data base is OK like your code. But for MySQL is not working.

INSERT INTO chamada_enfermagem(Posto, Leito, Tipo, Tempo, Data) VALUES("P2A","215","ATENDIDO","00",now());

I tested this query on MySQL Workbench and it is working.

I also tested with OBDC SQLite. Connection ok, but when a send query, server crashes. When I open the table, I see a lot of same records.