Results 1 to 3 of 3

Thread: how the hell do i do this

  1. #1

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539

    how the hell do i do this

    Hey all, bit of a long winded one here

    ok created a oledbconnection - fine
    created oleDataAdapter - fine
    Created dataset11 - fine

    everything works fine (this is all done with VS.net built in controls)

    HOW THE HELL DO I STUFF A VARIABLE WITH SOMETHING FROM THE DATASET

    i need this

    m_intBlockId = blah blah blah from binding data
    here is some of windows generated code

    Me.txtAccId.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet11, "CustomerDetails.CustomerId"))

    i need to fill m_intBlockId with a column titled "BlockId"

    ????????????????????????
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  2. #2
    Junior Member
    Join Date
    Apr 2003
    Location
    India
    Posts
    30
    Can you be a bit clear about what you want..As far as I could get your problem, you want to extract the data from a DataSet into a variable. Am I right? then whats this Binding all about...

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Yeah I'm not sure what the binding is about either but here all the data is in the dataset once its filled. A dataset is a collection of dataTables which are just collections of dataRows. So you just drilldown to the data you need: MyDataSet.Tables("MyTable").Rows(0)("MyField")

    So something like this:
    VB Code:
    1. m_intBlockId=Me.DataSet11.Tables("CustomerDetails").Rows(0)("CustomerId")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width