Populate from a Table..?

Discussion in 'ASP .Net' started by Kent Johnson, Nov 23, 2003.

  1. Kent Johnson

    Kent Johnson Guest

    Hi all,

    I'm trying to give 180 sessionvariables a value from a table.
    I have tried:

    Dim MyObj As Object,intCnt As Integer, intTest As Integer
    For intCnt = 0 To 180
    MyObj = myDS.Tables(0).Rows(intCnt).Item("myField")
    intTest = MyObj
    Session(intCnt.ToString) = intTest
    Next

    What have I missed?

    /Kent J.
     
    Kent Johnson, Nov 23, 2003
    #1
    1. Advertising

  2. You missed .Value:

    Session(intCnt.ToString) = myDS.Tables(0).Rows
    (intCnt).Item("myField").Value

    >-----Original Message-----
    >Hi all,
    >
    >I'm trying to give 180 sessionvariables a value from a

    table.
    >I have tried:
    >
    >Dim MyObj As Object,intCnt As Integer, intTest As Integer
    > For intCnt = 0 To 180
    > MyObj = myDS.Tables(0).Rows(intCnt).Item

    ("myField")
    > intTest = MyObj
    > Session(intCnt.ToString) = intTest
    > Next
    >
    >What have I missed?
    >
    >/Kent J.
    >
    >
    >.
    >
     
    Sergey Poberezovskiy, Nov 24, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nithin
    Replies:
    0
    Views:
    613
    Nithin
    Dec 31, 2003
  2. Nithin
    Replies:
    0
    Views:
    332
    Nithin
    Dec 31, 2003
  3. Sharon
    Replies:
    4
    Views:
    803
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tp?=
    Oct 27, 2006
  4. csv java
    Replies:
    6
    Views:
    2,859
    Furious George
    Oct 15, 2006
  5. Enjoy Life
    Replies:
    2
    Views:
    293
    Roland Hall
    Feb 23, 2005
Loading...

Share This Page