PC Review


Reply
Thread Tools Rate Thread

Dataset update problem

 
 
Rich
Guest
Posts: n/a
 
      8th Apr 2004
Hi

I have a Windows form that has a number of controls on that are bound to a
dataset. I'm using the code below to save the data back to the database:

connDB.Open()
da.Update(ds, "EQUIPMENT")
connDB.Close()

The problem I have is that if I update a record and move to the next record
then save it works fine, however if I update a record and then click the
save button it does not save the changes. Can anyone tell me how to update
the dataset to see the changes to a record and save them without me having
to move to the next record first.

Hope this makes sense?

Thanks
Rich


 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      8th Apr 2004
Rich

probably when I understand you well

Give it a try?

Cor
>
> connDB.Open()


DirectCast(BindingContext(ds.Tables(0)), CurrencyManager).EndCurrentEdit()

> da.Update(ds, "EQUIPMENT")
> connDB.Close()
>



 
Reply With Quote
 
Rich
Guest
Posts: n/a
 
      8th Apr 2004
Hi Cor

Yes that works fine now. Thank you

Rich

"Cor Ligthert" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Rich
>
> probably when I understand you well
>
> Give it a try?
>
> Cor
> >
> > connDB.Open()

>
> DirectCast(BindingContext(ds.Tables(0)), CurrencyManager).EndCurrentEdit()
>
> > da.Update(ds, "EQUIPMENT")
> > connDB.Close()
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dataset update problem Elliot Microsoft ASP .NET 3 13th Dec 2007 11:08 AM
TIA.........Update problem in Dataset............ Tino Mclaren Microsoft ADO .NET 2 4th Feb 2005 09:40 AM
update problem in dataset.... Raphaël Désalbres Microsoft ADO .NET 2 5th Apr 2004 07:02 PM
DataSet update problem Renaud Langis Microsoft ADO .NET 1 10th Mar 2004 09:47 AM
DataSet Update Problem Shahar Microsoft C# .NET 1 10th Aug 2003 11:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:13 PM.