Hi ,
i’m using a scheduler with a data processor to update my sqlserver db .
index.html
…
scheduler.init('scheduler_here',new Date(2018,02,06),"timeline");
scheduler.load("./data.php");
var dp = new dataProcessor("./data.php");
dp.init(scheduler);
…
data.php
…
$scheduler = new schedulerConnector($res, “SQLSrv”);
$scheduler->enable_log(“temp.log”, true);
$scheduler->set_options(“sections”, $list);
If ($scheduler->is_select_mode())
$scheduler->render_sql(“SELECT KEYRIF,INDPRE,FINDPRE,ANAGRA,RISASS,RISNOME FROM WWEB_TASK_CALENDAR”,“PK”,“INDPRE,FINDPRE,ANAGRA,RISASS,RISNOME,KEYRIF”);
else
$scheduler->render_table(“CRMTASK”,“KEYRIF”,“INDPRE,FINDPRE,ANAGRA”);
…
When i save data i get this error :
temp.log
DataProcessor object initialized
1520498978x8_id => 1520498978x8
1520498978x8_start_date => 2018-03-06 14:45
1520498978x8_end_date => 2018-03-07 14:45
1520498978x8_text => ABABABABBA gvgfv
1520498978x8_RISASS => 2
1520498978x8_RISNOME => RISORSA 1
1520498978x8_KEYRIF => 12
1520498978x8_!nativeeditor_status => updated
ids => 1520498978x8
Row data [1520498978x8]
KEYRIF => 12
INDPRE => 2018-03-06 14:45
FINDPRE => 2018-03-07 14:45
ANAGRA => ABABABABBA gvgfv
RISASS => 2
RISNOME => RISORSA 1
!nativeeditor_status => updated
UPDATE CRMTASK SET INDPRE=‘2018-03-06 14:45’,FINDPRE=‘2018-03-07 14:45’,ANAGRA=‘ABABABABBA gvgfv’ WHERE KEYRIF=‘1520498978x8’
Exception: SQLSrv operation failed
The problem is that is using the value of rowData (‘1520498978x8’) instead of the value of KEYRIF (12) .
How can i solve it?