Re: Unable to Update Data table in Access Database via ADO



Oops! Forgot to include the URL ...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/usingadonet.asp

--
Brendan Reynolds (MVP)

"Brendan Reynolds" <brenreyn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:O5%23$U0pdFHA.3836@xxxxxxxxxxxxxxxxxxxxxxx
>
> You need to call the Update method of the DataAdapter before you call the
> AcceptChanges method of the DataSet. Take a look at the article at the
> following URL, particularly the section 'Updating Rows in a DataSet'.
>
> --
> Brendan Reynolds (MVP)
>
> "DesmondT" <DesmondT@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:1F18482D-BEBD-455B-BBA7-605828AD447D@xxxxxxxxxxxxxxxx
>> Here is exactly what I am trying to accomplish: I have my information
>> stored
>> in a Microsoft Access Database and I am using Microsoft Visual Studio
>> 2003 to
>> build a front end to gain access to the database.
>>
>> Step 1: I used the OleDbConnection to create a connection to the
>> Database (conProjectAllProjectFields)
>>
>> Step 2 : I used the OleDbDataAdapter to create a data adapter
>> (oledataadaAllProject) and wrote a querywithin the adapter query window
>> (Select * from Project)
>>
>> Step 3 : I created a data set (dsAllProject)
>>
>> Step 4: I then created some text boxes to represent each field
>>
>> Step 5: I then bind each text box to the data set via the
>> Binding-Text
>> property of the text box.
>>
>>
>> Clear and Fill the data set
>> ------------------------------
>>
>> dsAllProject.Clear()
>> oledataadaAllProject.Fill(dsAllProject)
>>
>> ACCEPT THE CHANGES
>> ----------------------------------
>> oledataadaAllProject.Update(dsAllProject, "PROJECT")
>> dsAllProject.PROJECT.AcceptChanges()
>>
>>
>>
>> After all that the modified data does not gets pushed to the taable
>>
>> Thenks a million
>>
>
>


.



Relevant Pages

  • RE: collections directly to database
    ... update method of the data adaptor passing to it as argument your connection ... is in the data set) back to your database. ... generate the appropriate SQL that would get it from the original state ( ... accept changes delete all info of past states on the dataset) this method ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Unable to Update Data table in Access Database via ADO
    ... You need to call the Update method of the DataAdapter before you call the ... > build a front end to gain access to the database. ... > and wrote a querywithin the adapter query window ... I then bind each text box to the data set via the Binding-Text ...
    (microsoft.public.data.ado)
  • Re: MVC/MVP swing GUI
    ... open source project so I can look at more than just the GUI) written following the MVP pattern. ... - Swing's own architecture isn't modeled as "pure" MVC or MVP, ... Each text field has an own Model, or should the sum of the text entries (some kind of data set) be the Model? ...
    (comp.lang.java.gui)
  • Re: Unable to Update Data table in Access Database via ADO
    ... "Brendan Reynolds" wrote: ... >>> in a Microsoft Access Database and I am using Microsoft Visual Studio ... >>> Clear and Fill the data set ...
    (microsoft.public.data.ado)
  • Re: Update and AcceptChanges
    ... data set (using GetChanges) and then perform the update on that. ... > when I call Update method of SqlDataAdaptor it calls AcceptChanges ... > automatically.is it possible to prevent calling AcceptChanges?? ...
    (microsoft.public.dotnet.languages.csharp)