I am using jRDC2 for uploading time values to the database.
Thats all working fine for valid time values.
My database columns also accepting null values and I want to use it.
For build up the commands with null values I have problems. Direct input of "Null" is working, assign a variable with "Null" and put it to the array list is not working:
This is working:
cmd.Name = "insert_arbeitszeiten"
cmd.Parameters = Array As Object(Datum,item.mitarbeiter_id,Null,Null,Null,item.Zweck,item.DateTimeTick)
commands.Add(cmd)
This is not working:
Dim Pausenzeit As String
Pausenzeit = Null
cmd.Name = "insert_arbeitszeiten"
cmd.Parameters = Array As Object(Datum,item.mitarbeiter_id,Pausenzeit,Pausenzeit,Pausenzeit,item.Zweck,item.DateTimeTick)
commands.Add(cmd)
Error: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect time value: 'null' for column 'pausenzeit' at row 1
Did I something wrong to assign Null to the variable?