Results 1 to 5 of 5

Thread: Conflict between two reminders

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2009
    Posts
    62

    Question 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

  2. #2
    Hyperactive Member nagasrikanth's Avatar
    Join Date
    Nov 2004
    Location
    India,Hyderabad.
    Posts
    420

    Re: Conflict between two reminders

    Can I ask at what line you are getting this error in the above code ??
    The Difference between a Successful person and others is not a Lack of Knowledge,
    But rather a Lack of WILL

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2009
    Posts
    62

    Re: Conflict between two reminders

    Indeed, there is just a message.. Also, another message comes
    It says (There is no row in position 1.)
    Last edited by mhb300; Mar 27th, 2010 at 11:11 AM.

  4. #4
    Hyperactive Member nagasrikanth's Avatar
    Join Date
    Nov 2004
    Location
    India,Hyderabad.
    Posts
    420

    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 ...
    The Difference between a Successful person and others is not a Lack of Knowledge,
    But rather a Lack of WILL

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2009
    Posts
    62

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width