Using SQL Server 2005, VB.Net
In my application am using 3 textbox
Textbox1.text = Date
Textbox2.text = TimeIn
Textbox3.text = TimeOut
I want to update my table by using the textbox value with condtion
For Example
Textbox1.text = 23/02/2009
Textbox2.text = 10:00 - HH:mm
Textbox3.text = 18:00
Query
update table1 set TimeIn = '" & Textbox2.Text & "', NewDate = case when CAST(LEFT('" & Textbox2.Text & "', 2) AS INT) > CAST(LEFT('" & Textbox3.Text & "', 2) AS INT) then '" & Textbox1.Text & "' + 1 else '" & Textbox1.Text & "' end, TimeOut = '" & Textbox3.Text & "' Where Date = '" & Textbox1.Text & "'
The above query is showing error as "Conversion failed when converting the varchar value '23/02/2009' to data type int"
Can any one give me a solution for this error.
Need Query Help.