Calender Dataset

id =
Minfo = event.source.parent.getComponent(‘All one string’).text
Mcolor = event.source.parent.getComponent(‘Selected Color’).text
Mstart_time = event.source.parent.getComponent(‘Start time’).text
Mend_time = event.source.parent.getComponent(‘End time’).text
if Minfo == “”:
system.gui.messageBox(“Please complete selection”)
system.db.runPrepUpdate(“INSERT INTO Calender_Dataset (startDate,endDate,displayColor,display) VALUES (?,?,?,?)”,Mstart_time,Mend_time,Mcolor,Minfo)

I am trying to use the above code to insert into an MSSql Table.
I get the following error about ‘coercing’ values.

java.lang.ClassCastException: java.lang.ClassCastException: Cannot coerce value ‘2012-06-20 17:30:00’ into type: class [Ljava.lang.Object;

What MS data format do my column need to be in SQL?

Change this line:system.db.runPrepUpdate("INSERT INTO Calender_Dataset (startDate,endDate,displayColor,display) VALUES (?,?,?,?)",Mstart_time,Mend_time,Mcolor,Minfo)to this:system.db.runPrepUpdate("INSERT INTO Calender_Dataset (startDate,endDate,displayColor,display) VALUES (?,?,?,?)", [Mstart_time,Mend_time,Mcolor,Minfo])Notice I added square brackets before and after the variables to make a list. The second argument of the runPrepUpdate is a list of values to substitute for each ?.