Greetings everyone,
Can someone help me please on this error, you can also point to me where the converstion of the data type happen.
If Not ListView1.Items.Count = 0 Then
Do Until iLoop = ListView1.Items.Count
lvitem = ListView1.Items.Item(iLoop)
With lvitem
query3.Connection.Open()
query3.CommandText = String.Format("INSERT INTO workout_title_tbl VALUES((Select customer_Id From registered_cust_tbl),@workout_Title,@customer_Workout,@workoutType,@workoutInstruct,@date_Created,@time_Created)")
query3.Parameters.Add("@workout_Title", SqlDbType.VarChar).Value = routineNameLbl.Text
query3.Parameters.Add("@customer_Workout", SqlDbType.VarChar).Value = .SubItems(0).Text
query3.Parameters.Add("@workoutType", SqlDbType.VarChar).Value = .SubItems(1).Text
query3.Parameters.Add("@workoutInstruct", SqlDbType.VarChar).Value = .SubItems(2).Text.ToString
query3.Parameters.Add("@date_Created", SqlDbType.Date).Value = DateAndTime.Now.ToShortDateString
query3.Parameters.Add("@time_Created", SqlDbType.VarChar).Value = DateAndTime.Now.ToShortTimeString
query3.ExecuteNonQuery()
End With
iLoop = iLoop + 1
lvitem = Nothing
Loop
End If
Thank you in advance.