Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to tell on bootup if there is a connection, or pending connection?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to tell on bootup if there is a connection, or pending connection?

    I have an AddOn that loads a bunch of data from external SQL database into my NT App.....and depending on if there is a connection or not I need to load different data.

    On Startup...how can I tell if there is a Connection, either pending or connected?

    Because the No Connected / Not Connecting state would load different data.

    Thank you.

    #2
    this doesn't work to indicate no-connection

    if (Connection.Connections == null)

    this works for playback

    if (Cbi.Connection.PlaybackConnection != null)

    Comment


      #3
      Good reading here and here.

      Try something like,

      Code:
      if (Connection.Status == ConnectionStatus.Connected &&
          Connection.PriceStatus == ConnectionStatus.Connected)
          // you are fully connected
      else
          // not fully connected

      Comment


        #4
        You might want to try using this.

        The idea is that you would load your initial set of
        data at startup (depending on connected or not),
        just like you're doing now.

        But when the ConnectStatusUpdate event handler
        tells you that the connection is fully connected after
        your startup, you know you can safely load the
        connected set of data.

        That is,
        Whenever the event handler says you are fully connected,
        then you clear your current data and (re)load the connected
        data set from the database.

        Comment


          #5
          That helps, thank you.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          596 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          343 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          556 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          554 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X