Results 1 to 2 of 2

Thread: MYSQL - Data from bound dataset [RESOLVED]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Location
    Manchester
    Posts
    266

    MYSQL - Data from bound dataset [RESOLVED]

    Hello all,

    A very quick one. I wonder if anyone has a solution to this:

    I have a few bound data controls on a form. However, there are certain data fields in the same table from which this data is coming from which I would like to be able to access in memory but which is not bound to a control.

    I have tried looking through the properties of my datanavigator, my dataadapter and my databindingsource and can't seem to find out how to sort this.

    In simple terms, I have a data navigator to iterate through various fields in my dataset. I want to be able to access to the contactID of the currently visible / selected contact. The contact ID exists in the data source but I do not want to show it, just access it. How do I do so without issuing a manual SQL call to the database again?

    Jordan
    Last edited by intraman; Jan 17th, 2012 at 10:55 AM. Reason: Resolved

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Location
    Manchester
    Posts
    266

    Re: MYSQL - Data from bound dataset

    I found the solution, for anyone who might stumble upon this thread, you can access the value of an item like this, where "ContactID" is the name of the field value you want to retrieve.

    form.Contact_dataBindingSource.Current("ContactID")

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