This is a migrated thread and some comments may be shown as answers.

Deleting Docks from Database

1 Answer 38 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 04 Dec 2012, 01:29 PM
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?

1 Answer, 1 is accepted

Sort by
0
Jeff
Top achievements
Rank 1
answered on 04 Dec 2012, 06:14 PM
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
Tags
Dock
Asked by
Jeff
Top achievements
Rank 1
Answers by
Jeff
Top achievements
Rank 1
Share this question
or