PC Review


Reply
Thread Tools Rate Thread

How do I requiry a dataset?

 
 
=?Utf-8?B?UGF1bCBEZVdpdHQ=?=
Guest
Posts: n/a
 
      28th Jun 2005
I have a form with 2 tabs. 1 tab contains a data entry screen and the second
tab contains a datagrid with a listing of the entered data. I fill the
datagrid when I load the form. I want to requiry or refill the datagrid when
the tab is made active. Is there a refill command for the dataset? I have
tried dataset.fill() and dataset.getchanges() and dataadapter.Update.

Thanks
 
Reply With Quote
 
 
 
 
Francois Bonin [MVP]
Guest
Posts: n/a
 
      28th Jun 2005
Could you be a bit more detailed?
Does the first tab make modifications to the data that is being displayed on
the 2nd tab?
If this is not the case, a simple dataadapter.Fill(dataset) on the 2nd tab
will do the trick.
If you ARE making modifications, then you should write those modifications
before calling dataadapter.Fill(...)
and you do that with dataadapter.Update(...)

HTH,
Cois

"Paul DeWitt" <(E-Mail Removed)> wrote in message
news:66CD725D-446A-44AE-A4EF-(E-Mail Removed)...
>I have a form with 2 tabs. 1 tab contains a data entry screen and the
>second
> tab contains a datagrid with a listing of the entered data. I fill the
> datagrid when I load the form. I want to requiry or refill the datagrid
> when
> the tab is made active. Is there a refill command for the dataset? I
> have
> tried dataset.fill() and dataset.getchanges() and dataadapter.Update.
>
> Thanks



 
Reply With Quote
 
=?Utf-8?B?UGF1bCBEZVdpdHQ=?=
Guest
Posts: n/a
 
      29th Jun 2005
The first tab contains a list of fields with a toolbar with an add button.
The second tab contains a dataset with read-only data. It is a display of
the previously entered data. I tried the dataadapter.update command but it
did not work. I perform the dataadapter.fill command when the form is
created. If I execute a second fill statement, the datagrid contains double
records.

"Francois Bonin [MVP]" wrote:

> Could you be a bit more detailed?
> Does the first tab make modifications to the data that is being displayed on
> the 2nd tab?
> If this is not the case, a simple dataadapter.Fill(dataset) on the 2nd tab
> will do the trick.
> If you ARE making modifications, then you should write those modifications
> before calling dataadapter.Fill(...)
> and you do that with dataadapter.Update(...)
>
> HTH,
> Cois
>
> "Paul DeWitt" <(E-Mail Removed)> wrote in message
> news:66CD725D-446A-44AE-A4EF-(E-Mail Removed)...
> >I have a form with 2 tabs. 1 tab contains a data entry screen and the
> >second
> > tab contains a datagrid with a listing of the entered data. I fill the
> > datagrid when I load the form. I want to requiry or refill the datagrid
> > when
> > the tab is made active. Is there a refill command for the dataset? I
> > have
> > tried dataset.fill() and dataset.getchanges() and dataadapter.Update.
> >
> > Thanks

>
>
>

 
Reply With Quote
 
=?Utf-8?B?U3RldmVuIFBlcnJ5?=
Guest
Posts: n/a
 
      29th Jun 2005
You can Clear the dataset first, or just the table you are using. This will
prevent the double entries.
--
-
Thanks,

Steven Perry


"Paul DeWitt" wrote:

> The first tab contains a list of fields with a toolbar with an add button.
> The second tab contains a dataset with read-only data. It is a display of
> the previously entered data. I tried the dataadapter.update command but it
> did not work. I perform the dataadapter.fill command when the form is
> created. If I execute a second fill statement, the datagrid contains double
> records.
>
> "Francois Bonin [MVP]" wrote:
>
> > Could you be a bit more detailed?
> > Does the first tab make modifications to the data that is being displayed on
> > the 2nd tab?
> > If this is not the case, a simple dataadapter.Fill(dataset) on the 2nd tab
> > will do the trick.
> > If you ARE making modifications, then you should write those modifications
> > before calling dataadapter.Fill(...)
> > and you do that with dataadapter.Update(...)
> >
> > HTH,
> > Cois
> >
> > "Paul DeWitt" <(E-Mail Removed)> wrote in message
> > news:66CD725D-446A-44AE-A4EF-(E-Mail Removed)...
> > >I have a form with 2 tabs. 1 tab contains a data entry screen and the
> > >second
> > > tab contains a datagrid with a listing of the entered data. I fill the
> > > datagrid when I load the form. I want to requiry or refill the datagrid
> > > when
> > > the tab is made active. Is there a refill command for the dataset? I
> > > have
> > > tried dataset.fill() and dataset.getchanges() and dataadapter.Update.
> > >
> > > Thanks

> >
> >
> >

 
Reply With Quote
 
Francois Bonin [C# MVP]
Guest
Posts: n/a
 
      1st Jul 2005
From what I gather, you are making modifications on the 1st tab.
Are you making those modifications directly to the database (by using SQL
queries or stored procedures)?
If this is the case, then you will have to:
1. Clear() the DataSet
2. call dataadapter.Fill()

If instead, you are making those modifications to the DataSet object, you
will have to
1. call dataset.AcceptChanges(); you do NOT have to call dataadapter.Fill()
2. write the modifications to the underlying database by calling
dataadapter.Update()

Cois


"Paul DeWitt" <(E-Mail Removed)> wrote in message
news:C6F3C59C-2614-41E1-83C8-(E-Mail Removed)...
> The first tab contains a list of fields with a toolbar with an add button.
> The second tab contains a dataset with read-only data. It is a display of
> the previously entered data. I tried the dataadapter.update command but
> it
> did not work. I perform the dataadapter.fill command when the form is
> created. If I execute a second fill statement, the datagrid contains
> double
> records.
>
> "Francois Bonin [MVP]" wrote:
>
>> Could you be a bit more detailed?
>> Does the first tab make modifications to the data that is being displayed
>> on
>> the 2nd tab?
>> If this is not the case, a simple dataadapter.Fill(dataset) on the 2nd
>> tab
>> will do the trick.
>> If you ARE making modifications, then you should write those
>> modifications
>> before calling dataadapter.Fill(...)
>> and you do that with dataadapter.Update(...)
>>
>> HTH,
>> Cois
>>
>> "Paul DeWitt" <(E-Mail Removed)> wrote in message
>> news:66CD725D-446A-44AE-A4EF-(E-Mail Removed)...
>> >I have a form with 2 tabs. 1 tab contains a data entry screen and the
>> >second
>> > tab contains a datagrid with a listing of the entered data. I fill the
>> > datagrid when I load the form. I want to requiry or refill the
>> > datagrid
>> > when
>> > the tab is made active. Is there a refill command for the dataset? I
>> > have
>> > tried dataset.fill() and dataset.getchanges() and dataadapter.Update.
>> >
>> > Thanks

>>
>>
>>



 
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
continue regular program flow (records) after requiry Vsn Microsoft Access Form Coding 2 19th May 2008 04:30 PM
How do I make an Access form requiry itself every 30 seconds? =?Utf-8?B?R3JlZ1I=?= Microsoft Access Forms 4 5th May 2007 08:28 PM
acDataErrAdded causes combo box to requiry but I still get error message? Jim Shaw Microsoft Access Form Coding 10 11th Nov 2004 01:45 PM
Re: me.requiry subform? Harmannus Microsoft Access Forms 0 1st Sep 2003 06:57 AM
Re: me.requiry subform? Dirk Goldgar Microsoft Access Forms 0 30th Aug 2003 10:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:32 PM.