Writing to SQL from drop-down boxes

Hello all!

I am struggling on saving data from drop-down boxes and popup calendar to a SQL table. The data in the drop-down boxes is machine ID and then downtime event for 24 hours. It gives me error saying:

            VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?), [Mon Mar 21 00:00:00 GMT 2016, 68001, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 3, -1, -1, -1, -1, -1, -1], , , false, false)
	caused by GatewayException: SQL error for "INSERT INTO [IBS_PROD_DOWNTIME] ([DowntimeDate],[StationID],[Hour0],[Hour1],[Hour2],[Hour3],[Hour4],[Hour5],
   [Hour6],[Hour7],[Hour8],[Hour9],[Hour10],[Hour11],[Hour12],[Hour13],[Hour14],[Hour15],[Hour16],[Hour17],[Hour18],[Hour19],[Hour20],[Hour21],[Hour22],[Hour23]) 
             VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)": Arithmetic overflow error converting expression to data type nvarchar.
	caused by SQLServerException: Arithmetic overflow error converting expression to data type nvarchar.

The code is as below for buttonActionPerferomed();

window = system.gui.getParentWindow(event)
machine = window.getComponentForPath('Root Container.Dropdown 1').selectedStringValue
hrs00 = window.getComponentForPath('Root Container.Dropdown 2').selectedValue
hrs01 = window.getComponentForPath('Root Container.Dropdown 3').selectedValue
hrs02 = window.getComponentForPath('Root Container.Dropdown 4').selectedValue
hrs03 = window.getComponentForPath('Root Container.Dropdown 5').selectedValue
hrs04 = window.getComponentForPath('Root Container.Dropdown 6').selectedValue
hrs05 = window.getComponentForPath('Root Container.Dropdown 7').selectedValue
hrs06 = window.getComponentForPath('Root Container.Dropdown 8').selectedValue
hrs07 = window.getComponentForPath('Root Container.Dropdown 9').selectedValue
hrs08 = window.getComponentForPath('Root Container.Dropdown 10').selectedValue
hrs09 = window.getComponentForPath('Root Container.Dropdown 11').selectedValue
hrs10 = window.getComponentForPath('Root Container.Dropdown 12').selectedValue
hrs11 = window.getComponentForPath('Root Container.Dropdown 13').selectedValue
hrs12 = window.getComponentForPath('Root Container.Dropdown 14').selectedValue
hrs13 = window.getComponentForPath('Root Container.Dropdown 15').selectedValue
hrs14 = window.getComponentForPath('Root Container.Dropdown 16').selectedValue
hrs15 = window.getComponentForPath('Root Container.Dropdown 17').selectedValue
hrs16 = window.getComponentForPath('Root Container.Dropdown 18').selectedValue
hrs17 = window.getComponentForPath('Root Container.Dropdown 19').selectedValue
hrs18 = window.getComponentForPath('Root Container.Dropdown 20').selectedValue
hrs19 = window.getComponentForPath('Root Container.Dropdown 21').selectedValue
hrs20 = window.getComponentForPath('Root Container.Dropdown 22').selectedValue
hrs21 = window.getComponentForPath('Root Container.Dropdown 23').selectedValue
hrs22 = window.getComponentForPath('Root Container.Dropdown 24').selectedValue
hrs23 = window.getComponentForPath('Root Container.Dropdown 25').selectedValue
date = window.getComponentForPath('Root Container.Popup Calendar').date
values = [date,machine,hrs00,hrs01,hrs02,hrs03,hrs04,hrs05,hrs06,hrs07,hrs08,hrs09,hrs10,hrs11,hrs12,hrs13,hrs14,hrs15,hrs16,hrs17,hrs18,hrs19,hrs20,hrs21,hrs22,hrs23]
# Replace empty strings with None
values = [x if x !="" else None for x in values]
# If all values are None then the form is blank
if values.count(None) == len(values):
   system.gui.messageBox("Fill in the form first!")
else:
   insertQuery = """INSERT INTO [%s] ([DowntimeDate],[StationID],[Hour0],[Hour1],[Hour2],[Hour3],[Hour4],[Hour5],
   [Hour6],[Hour7],[Hour8],[Hour9],[Hour10],[Hour11],[Hour12],[Hour13],[Hour14],[Hour15],[Hour16],[Hour17],[Hour18],[Hour19],[Hour20],[Hour21],[Hour22],[Hour23]) 
             VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""" % 'IBS_PROD_DOWNTIME'
   system.db.runPrepUpdate(insertQuery, values)
   system.gui.messageBox("Successfully added Downtime event!")

I am also not sure how to get empty dropdown boxes to be equal to NULL. Thanks in advance!

I solved it myself it was a matter modifying the default value of dropdownboxes.