Dataset.HasChangesmethod ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Newman

    #1

    Dataset.HasChangesmethod ?


    I have a problem i donr seem to be able to find a soloution to

    i have created a dataset, binded the controls to it, set primary keys
    managed to set up navigation through the table
    and even search for a value and move to that record. I have now come to an
    abrupt halt with something i thought would be simple ..
    updating records.

    I have tried using the Client_RS.HasCh anges(DataRowSt ate.Modified) function
    ( Client_Rs being my Dataset )
    but im not getting the expected result.

    If make changes in the strCompanyName textbox, and check to see if the
    Client_RS.HasCh anges is true it isnt its still false, however if i move to
    the next row and back again then the Client_RS.HasCh anges is true. How can i
    get tha Client_RS.HasCh anges to return true as soon as the data is entered ?

    ' Binding Method
    ' Company Name
    strCompanyName. DataBindings.Ad d(New Binding("Text", Client_RS,
    "TBL_ClientAdmi n.CompanyName") )

    any ideas please
  • Cor Ligthert [MVP]

    #2
    Re: Dataset.HasChan gesmethod ?

    Peter,

    You can try the endcurrentedit method.
    That is to push data into the datasource without changing the current
    position.

    http://msdn2.microsoft.com/en-us/lib...rrentedit.aspx

    (By the way, using RS in an abbrivation for a DataSet is very misleading in
    my idea, a DataSet is a wrapper around DataTables, which is the most to
    compare with a classic RecordSet)

    I hope this helps,

    Cor

    "Peter Newman" <PeterNewman@di scussions.micro soft.comschreef in bericht
    news:8625CDCA-B312-4F51-A3DE-5BAD8B1A6B14@mi crosoft.com...
    >
    I have a problem i donr seem to be able to find a soloution to
    >
    i have created a dataset, binded the controls to it, set primary keys
    managed to set up navigation through the table
    and even search for a value and move to that record. I have now come to
    an
    abrupt halt with something i thought would be simple ..
    updating records.
    >
    I have tried using the Client_RS.HasCh anges(DataRowSt ate.Modified)
    function
    ( Client_Rs being my Dataset )
    but im not getting the expected result.
    >
    If make changes in the strCompanyName textbox, and check to see if the
    Client_RS.HasCh anges is true it isnt its still false, however if i move
    to
    the next row and back again then the Client_RS.HasCh anges is true. How
    can i
    get tha Client_RS.HasCh anges to return true as soon as the data is entered
    ?
    >
    ' Binding Method
    ' Company Name
    strCompanyName. DataBindings.Ad d(New Binding("Text", Client_RS,
    "TBL_ClientAdmi n.CompanyName") )
    >
    any ideas please

    Comment

    Working...