Hello: I have an update query on my page and it's complaining when I try to pass values...I think they're null, but they could be empty strings too.
here's my sql:
Code:
sSQL = "UPDATE tblStates SET Color1 = '" & DataGridView1.Item("C1", j).Value.ToString() & ",Brightness1 = '" & DataGridView1.Item("B1", j).Value.ToString() & "' ,Flash1 = '" & DataGridView1.Item("F1", j).Value.ToString() & "'," _
& " Color2 = '" & DataGridView1.Item("C2", j).Value.ToString() & "',Brightness2 = '" & DataGridView1.Item("B2", j).Value.ToString() & "' ,Flash2 = '" & DataGridView1.Item("F2", j).Value.ToString() & "'," _
& " Color3 = '" & DataGridView1.Item("C3", j).Value.ToString() & "',Brightness3 = '" & DataGridView1.Item("B3", j).Value.ToString() & "' ,Flash3 = '" & DataGridView1.Item("F3", j).Value.ToString() & "'," _
& " Color4 = '" & DataGridView1.Item("C4", j).Value.ToString() & "',Brightness4 = '" & DataGridView1.Item("B4", j).Value.ToString() & "' ,Flash4 = '" & DataGridView1.Item("F4", j).Value.ToString() & "'" _
& " WHERE StateId = " & sStateId
I was wondering how ...in access, to deal with this....? In oracle, there's an nvl function that replaces the null with what ever you want. Is there something similar for access sql? Or rather, do I need to use some type of expression...Iff statement in my update statement?
any dirrection is truly appreciated.
Thanks,
annarene