Conflict between two reminders
I have a form to set reminders on it. When I write a 1 reminder, everything works well. But when I write 2 reminders in same time, it comes this message.
(Column 'Reminder_Time' does not belong to table Reminder.)
Actually, I am not sure why this problem comes, and I don't know how I can solve it.
Maybe it's from Timer's code...If so, here it is.
Code:
Dim i As Integer
TextBox3.Text = DateTime.Now.ToShortDateString()
TextBox4.Text = System.DateTime.Now.ToShortTimeString
strsql = "Select Reminder_Time from reminder where Reminder_Date = '" & TextBox3.Text & "'"
oledbcon.Open()
Dim cmd As New OleDbCommand(strsql, oledbcon)
da = New OleDbDataAdapter(cmd)
ds = New DataSet
da.Fill(ds, "Reminder")
dt = ds.Tables(0)
Dim find As String = cmd.ExecuteScalar
oledbcon.Close()
For i = 0 To dt.Rows.Count - 1
Dim tabl As String = (dt.Rows(i)("Reminder_Time"))
oledbcon.Close()
If tabl <> Nothing Then
If TextBox4.Text = tabl Then
Pop.Show()
End If
End If
Next
Re: Conflict between two reminders
Can I ask at what line you are getting this error in the above code ??
Re: Conflict between two reminders
Indeed, there is just a message.. Also, another message comes
It says (There is no row in position 1.)
Re: Conflict between two reminders
huh.. strange.. Why can't you just debug and see at what line it was coming.. looks like, the error was because you are trying to access some row data with out its existence... I mean.. May be it was not retriving any data and you are checking for data.. :(
Just some wage idea.. But a clear error will help better ...
Re: Conflict between two reminders
LooL.. Yes, I cannot see any error, Just 2 messages.
These messages come when I write two "or more" appointment at the same time.