T
Tue Apr 27 09:58:58 CDT 2004
Yes, and it always happens in the same Table ??? I don't get it
"William Ryan eMVP" <dotnetguru@comcast.nospam.net> wrote in message
news:OvHvOTGLEHA.1032@tk2msftngp13.phx.gbl...
> I just saw your other post, so it's essentially fixed but that one
> exception?
> "T Cordon" <tcordonb@hotmail.com> wrote in message
> news:OWOA8JGLEHA.1348@TK2MSFTNGP12.phx.gbl...
> > It just inserts everything. Tables are cleared previous to this.
> >
> >
> > "William Ryan eMVP" <dotnetguru@comcast.nospam.net> wrote in message
> > news:e5sQehFLEHA.3664@TK2MSFTNGP10.phx.gbl...
> > > T:
> > >
> > > Does the web service automatically infer that it's going to insert
> > > everything (ie the update logic is such that it doesn't use Rowstate
to
> > > insert the rows, it just loops through them and adds them no matter
> what)?
> > > Or does it depend on Rowstate?
> > > "T Cordon" <tcordonb@hotmail.com> wrote in message
> > > news:uwVbOYBLEHA.3016@tk2msftngp13.phx.gbl...
> > > > Hi, Thanks for your repply.
> > > >
> > > > It seems to be pointing me to the right direction but I just can't
get
> > it
> > > to
> > > > work.
> > > >
> > > > What I am trying to to is to update an Access DB using a web
service.
> So
> > > int
> > > > the local App (WinForms - VB) I get all the tables in the database,
> and
> > > for
> > > > earch one, fill a dataset that I send to the webservice. The
structure
> > of
> > > > the DB is exactly the same in both places. The web service is
supposed
> > to
> > > > get the dataset and and table name, drop all current records and
> insert
> > > all
> > > > the records it got from the dataset it received.
> > > >
> > > > Any help is greatly appreciated.
> > > >
> > > > Thanks Again.
> > > >
> > > >
> > > > "William Ryan eMVP" <bill@NoSp4m.devbuzz.com> wrote in message
> > > > news:O533Ar$KEHA.2556@TK2MSFTNGP11.phx.gbl...
> > > > > It depends on how you got those records there. If the Rowstate of
> > each
> > > > row
> > > > > is "Added" then all you need to do is provide a valid Insert
command
> > to
> > > > your
> > > > > dataadapter and call the .Update method of the adapter. So, if
you
> > are
> > > > > filling it from another table in this db or another db, then when
> you
> > > call
> > > > > DataAdapter.Fill from the original adapter, set the
> > > > .AcceptChangesDuringFill
> > > > > property to false. This will cause all of the records inserted to
> > have
> > > a
> > > > > rowstate or Added. Then call .Update with an adapter who's update
> > > command
> > > > > is pointing to the destination table, and they'll all be inserted.
> > > > >
http://www.knowdotnet.com/articles/datasetmerge.html
> > > > >
> > > > > Otherwise, you may need to take a different approach. If whatever
> > > approach
> > > > > you used (like manually adding the rows) cause the Rowstate to be
> > added,
> > > > the
> > > > > same will hold true. Otherwise, you may have to loop through the
> > > Dataset,
> > > > > and use the values as paramaters for an insert statement or use
the
> > > values
> > > > > to manually build an insert statement, then calling
executeNonQuery.
> > By
> > > > far
> > > > > calling update is the easisest. You can check if the dataset has
> > > changes
> > > > > via DataSet.HasChanges and if so, let me know what the rowstate is
> if
> > > it's
> > > > > not added, I'll walk you through the second approach I mentioned
> here.
> > > > >
> > > > > HTH,
> > > > >
> > > > > Bill
> > > > > "T Cordon" <tcordonb@hotmail.com> wrote in message
> > > > > news:uuiZ8U$KEHA.2692@tk2msftngp13.phx.gbl...
> > > > > > How can I insert all records from a DataSet to an Access Table.
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>