Deleting Docks from Database

2 posts, 0 answers
  1. Jeff
    Jeff avatar
    17 posts
    Member since:
    Sep 2012

    Posted 04 Dec 2012 Link to this post

    Good morning, all.

    I have a question regarding the state strings stored in a SQL server.  I have some code in which a user selects a dock from a menu, as well as a zone in which to place the dock.  The docks are created properly and their states are saved as they should be, but I've noticed that any docks with "Closed":"True" are never being deleted from the string that's stored server-side.  For example, I have one user's string with about 34 docks in it, but only 1 of them is open and rendering (which is functioning correctly).  Is there something I'm missing that will get rid of the other 33 docks that are closed?
  2. Jeff
    Jeff avatar
    17 posts
    Member since:
    Sep 2012

    Posted 04 Dec 2012 Link to this post

    Never mind; I got it.  All I had to do was check the Closed property of the stateList variable.  If it's "true", I skip to the next one.  If it's "false", I append it as normal.

            While i < stateList.Count
                   
    If stateList(i).Closed = True Then
                         GoTo Skip
                   
    Else
                         serializedList.Append(stateList(i).ToString())
                         serializedList.Append(
    "|")
                   
    End If
    Skip:           System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)
              
    End While
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top