MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data
Go Back  Xtreme Visual Basic Talk > > > MySQL Inside Timer Not Returning Updated Data


Reply
 
Thread Tools Display Modes
  #1  
Old 02-03-2014, 11:54 AM
hauntmisery hauntmisery is offline
Freshman
 
Join Date: Sep 2006
Posts: 26
Default MySQL Inside Timer Not Returning Updated Data


So i am having a little issue with some code i have.. Its inside a timer and when it runs it just keeps the same data never sees that it does an update to the mysql and makes 0 become 1 if there is data there.

How do i get it to refresh the sql query so it sees that the data has indeed changed?

Here is my code

Code:
 Public Function updateMessageCore()

        Connect.ConnectDatabase()

        sql_chat_balloon_tip_one = "select * from wp_bp_chat_client_user_core where user_id ='" & login.usrLoggedID & "' and balloon_tip_status = '0'"



        Dim balloon_tip_cmd_one = Connect.doCMD(sql_chat_balloon_tip_one)

        While balloon_tip_cmd_one.Read()

            balloon_tip_data_one &= balloon_tip_cmd_one.GetString(5) & ","

        End While

        balloon_tip_cmd_one.Close()

        Console.Write(balloon_tip_data_one)

        'number two call

        Dim balloon_break As String = balloon_tip_data_one
        Dim balloon_breaks() As String
        balloon_breaks = balloon_break.Split(",")

        For Each balloon_tips As String In balloon_breaks

            sql_chat_balloon_tip_two = "select * from wp_bp_chat_client_message where user_id ='" & login.usrLoggedID & "' and chat_session_id = '" & balloon_tips & "' ORDER BY id DESC"

            Dim balloon_tip_cmd_two = Connect.doCMD(sql_chat_balloon_tip_two)

            While balloon_tip_cmd_two.Read()



                NotifyIcon1.ShowBalloonTip(2000, "New Message", balloon_tip_cmd_two.GetString(3), ToolTipIcon.Info)

                Console.Write(balloon_tip_cmd_two.GetString(3))

                'doAction("UPDATE wp_bp_chat_client_user_core SET balloon_tip_status = '1' WHERE chat_session_id = '" & balloon_tips & "'")


            End While

            balloon_tip_cmd_two.Close()

        Next

        For Each balloon_tips As String In balloon_breaks

            doAction("UPDATE wp_bp_chat_client_user_core SET balloon_tip_status = '1' WHERE chat_session_id = '" & balloon_tips & "'")

        Next

        Connect.DisconnectDatabase()


    End Function

    Private Sub timer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles timer.Elapsed


        updateMessageCore()


    End Sub
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data
 
MySQL Inside Timer Not Returning Updated Data
MySQL Inside Timer Not Returning Updated Data
 
-->