Insert a table in a database in SQLServer database to anothe

Hello, I have the following problem, I need to insert a table from a database in SQLServer database to another MySQL, however I can not insert the data to the alert table that I created and I do not see the error, my script is as follows:

If you could give me a help, thanks

insert a table in a database in SQLServer database to another on MySQL

desde=system.tag.read("[]desde")
alarmas = system.db.runScalarQuery(“SELECT DateTime, Text1, Text3, State FROM AlgViewESP WHERE DateTime>=”"+ desde.value+"" ORDER BY DateTime ASC ",“COBOCE_ALGVIEWESP”)
i=0
while i<alarmas.rowcount
DateTime=alarmas(i,0)
Text1=alarmas(i,1)
Test3=alarmas(i,2)
State=alarmas(i,3)
system.db.runScalarQuery(“INSERT INTO alarm (DateTime, Text1, Text3, State) VALUES (?,?,?,?)”,[DateTime, Text1, Text3, State] ,“COBOCE_ALGVIEWESP”)

If you could give me a help, thanks!!