Results 1 to 2 of 2

Thread: Update records in data grid

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    83

    Update records in data grid

    Hi:

    Im developing a web based application in .net. I have a datagird with the edit feature enabled by using the textboxes which are bind to a dataset. when i try to change the values, i update the dataset but the database isn't modified. the code is as follows:

    Private Sub DataGrid_plantdesc_UpdateCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid_plantdesc.UpdateCommand
    Dim uc, sa, pl As String

    uc = e.Item.Cells(0).Text
    sa = CType(e.Item.Cells(1).Controls(0), TextBox).Text
    [COLOR=orange]
    pl = CType(e.Item.Cells(2).Controls(0), TextBox).Text
    [COLOR=orange]

    Dim conn1 As New OleDb.OleDbConnection("Provider=MSDAORA.1;Password=eas;User ID=eas;Data Source=WETST920.world")
    Dim sqlUpdate As String = " update plant_desc set subarea='" & UCase(sa) & "' , plant='" & UCase(pl) & "' where unit_code='" & UCase(uc) & "' "

    the problem is at the begining, it doesnt read the new enetred data at the orange highlighted. it takes the previous data before clicking on the edit command.

    any suggestions?

    Please help.

    Thanks

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    83
    can anyone help me on this?

    Thanks

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