CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Location
    Jakarta, Indonesia
    Posts
    596

    Error When Updating via Datagrid

    hi all

    i got this code that populate my datagrid
    [VBCODE]sSQL = "SELECT [Artikel], [HPP], [HPP_baru] FROM barang"
    rsBrg.CursorLocation = adUseClient
    rsBrg.Open sSQL, Conn, adOpenDynamic, adLockOptimistic

    Set dgBarang.DataSource = rsBrg
    dgBarang.Refresh[/VBCODE]
    i set the AllowUpdate properties for the Datagrid to TRUE
    when i changed the first column(Artikel) which is the PK, it went smooth..but when i changed the 2nd and 3rd column, an error raised
    Row cannot be located for updating. Some values may have been changed since it was last read
    anyone have any clues?

    PS : the database is located at my local hard drive (for testing purpose), and the value doesn't changed by anyone

    thanks

    1st NF - a table should not contain repeating groups.
    2nd NF - any fields that do not depend fully on the primary key should be moved to another table.
    3rd NF - there should be no dependency between non key fields in same table.
    - E. Petroutsos -


    eRiCk

    A collection of "Laku-abis" Ebook, Permanent Residence

    Access Reserved Words, a Classic Form Bug, Access Limitation, Know run Process and the Lock they hold in, Logging User Activity in MSSQL

  2. #2
    Join Date
    Aug 2000
    Location
    NY, USA
    Posts
    632

    Re: Error When Updating via Datagrid

    Does it happen if you start from the second column?

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

Featured