Re: Unable to Update Data table in Access Database via ADO
- From: "Brendan Reynolds" <brenreyn@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 21 Jun 2005 21:24:49 +0100
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
>>
>
>
.
- Follow-Ups:
- Re: Unable to Update Data table in Access Database via ADO
- From: DesmondT
- Re: Unable to Update Data table in Access Database via ADO
- References:
- Unable to Update Data table in Access Database via ADO
- From: DesmondT
- Re: Unable to Update Data table in Access Database via ADO
- From: Brendan Reynolds
- Unable to Update Data table in Access Database via ADO
- Prev by Date: Re: Unable to Update Data table in Access Database via ADO
- Next by Date: Easiest way to query Dataset and return a Dataset
- Previous by thread: Re: Unable to Update Data table in Access Database via ADO
- Next by thread: Re: Unable to Update Data table in Access Database via ADO
- Index(es):
Relevant Pages
|
|