Post again: Why the source database not updated?

Discussion in 'ASP .Net' started by CM, Jan 6, 2004.

  1. CM

    CM Guest

    Hi there:
    Following is the code, after change the Dataset, accepte the change made to
    the dataset and excute the update of Adapter, nothing happened to the
    database source database, what's wrong?
    Thanks!
    CM

    -------------------------------------------------
    Private Sub UpdateApartment()
    Dim i As Integer
    Dim myDataAdapter As OleDbDataAdapter
    Dim myDataset As DataSet
    Dim MyConnection As OleDbConnection

    i = Session("intIndex")
    myDataset = Session("tableApt")
    myDataAdapter = Session("myAdapter")
    MyConnection = Session("ADMConn")
    With myDataset.Tables("Apt")
    .Rows(i)("Company") = txtCompanyName.Text
    .Rows(i)("BuildingName") = txtBuildingName.Text
    End With

    myDataset.AcceptChanges()
    MyConnection.Open()
    myDataAdapter.Update(myDataset. "Apt")
    MyConnection.Close()

    End Sub
     
    CM, Jan 6, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CM
    Replies:
    1
    Views:
    433
  2. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    997
    Mark Rae
    Dec 21, 2006
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,270
    Smokey Grindel
    Dec 2, 2006
  4. Dmitry Korolyov

    Datagrid not updated during delete, but updated during insert and update

    Dmitry Korolyov, Sep 22, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    445
    Dmitry Korolyov
    Sep 22, 2003
  5. JT

    post data, then post again..

    JT, Sep 5, 2003, in forum: ASP General
    Replies:
    1
    Views:
    162
    Bite My Bubbles
    Sep 6, 2003
Loading...

Share This Page