Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable hides a variable in an enclosing block
Message
From
27/04/2006 16:31:17
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Variable hides a variable in an enclosing block
Miscellaneous
Thread ID:
01117297
Message ID:
01117297
Views:
143
I am creating a dataset manually, assigning its definition, defining rows and adding them to it. This has always worked well so far. However, in this particular syntax, I just can't find why I am having the error "Variable loRow2 hides a variable in an enclosing block". Here is the code:
        Dim loDataSet As DataSet = New DataSet
        loDataSet.Tables.Add("Temp")
        loDataSet.Tables(0).Columns.Add("Claim_No", GetType(System.String))

        For lnCounter = 1 To oDataProvider.nCount
            loRow = oDataProvider.oDataView(lnCounter - 1).Row

            Dim loRow2 As DataRow = loDataSet.Tables(0).NewRow
            Select Case oApp.nLanguage

                Case 1
                    loRow2("Claim_No") = loRow("Claim_No")
            End Select

            loDataSet.Tables(0).Rows.Add(loRow2)
        Next
The error is at the Dim loRow2 declaration.
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
Next
Reply
Map
View

Click here to load this message in the networking platform