Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where is the code going?
Message
De
21/01/2005 03:27:42
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Where is the code going?
Divers
Thread ID:
00979199
Message ID:
00979199
Vues:
52
This is a weird situation. I have the following code:
        ' Initialize the combobox with all servers
        For lnCounter = 1 To lnNumberOfServer
            loWebService.Url = ComboBox1.Items(lnCounter - 1).ToString

            Try
                llLogged = loWebService.Login(lcUsername, lcPassword)
                If llLogged Then

                    ' Get the server name
                    lcServerName = Framework.FileFunction.GetIni(lcStartupDirectory + "Main.ini", "WebService", "ServerName" + Trim(Str(lnCounter)))

                    loData = New DataSet
                    loData = loWebService.GetError()

                    For lnCounter2 = 0 To loData.Tables("Temp").Rows.Count - 1
                        lcHTML = lcHTML + "<TR VALIGN=TOP>"
                        lcHTML = lcHTML + "<TD>" + lcServerName
                        lcHTML = lcHTML + "<TD ALIGN=RIGHT>" + loData.Tables("Temp").Rows(lnCounter2)("Numero").ToString
                        lcHTML = lcHTML + "<TD>" + loData.Tables("Temp").Rows(lnCounter2)("AddDate").ToString
                        lcHTML = lcHTML + "<TD>" + loData.Tables("Temp").Rows(lnCounter2)("Message")
                        lcHTML = lcHTML + "<TD>" + loData.Tables("Temp").Rows(lnCounter2)("Module")
                        lcHTML = lcHTML + "<TD ALIGN=RIGHT>" + loData.Tables("Temp").Rows(lnCounter2)("NoLigne").ToString
                        lcHTML = lcHTML + "<TD>" + loData.Tables("Temp").Rows(lnCounter2)("IP")
                    Next
                End If
            Catch loError As Exception
            End Try
            Framework.FileFunction.CreateFile(lcHTML, "d:\a" + lnCounter.ToString + ".txt")

        Next
        Framework.FileFunction.CreateFile(lcHTML, "d:\z" + lnCounter.ToString + ".txt")
The loop is executed four times. So, before the Next, at each occurence, I have creating a file just to be sure that the code is well executed. So, I end up with four files created which is ok. But, once the For/Next is completed, another file should be created. That should be d:\z4.txt. But, this line and any other line after the For/Next are never executed. This is running inside a timer event. What could cause such behavior?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform