Re: Weired Problems with Dataset and Dataviews

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: One Handed Man \( OHM#\) ("One)
Date: 06/12/04


Date: Sat, 12 Jun 2004 11:24:57 +0100

Actually, you should start with -1 and count down

OHM

"Lars Netzel" <nospam@no.no> wrote in message
news:uuuK0WGUEHA.3780@TK2MSFTNGP10.phx.gbl...
> Okay I understand what you mean and that actually solved another probelm..
> but not the problem I asked about in this thread.
>
> The problem is that if I use a DataView that has no records the
> Autoincrement starts on 0 whereas the Access Tables (that the DataView is
> based on) always start on 1... which is a bit of a problem. So when I add
a
> new row I see the ID field auto fills in a 0 but When I save, it becomes 1
> in the database... and then all the other information in the application
> based on that ID (which is 0 i runtime before I have saved) will be all
> messed up. Cause their ParentID is then 0 which does'nt exist.
>
> Maybe you misunderstood me OR maybe you actually answered me but I
> misunderstod you?
>
> I guess What I want is someway of telling the Dataview to start the
> Autoincrement on 1 and not 0....
>
> /Lars
>
>
>
>
>
> "Cor Ligthert" <notfirstname@planet.nl> skrev i meddelandet
> news:%23m4lk5FUEHA.808@tk2msftngp13.phx.gbl...
> > Hi Lars,
> >
> > Because the dataset is disconnected.
> > When you use autoincrement you would have to do always this
> >
> > ds.update(xx)
> > ds.fill(xx) 'with this it gets the assigned numbers
> >
> > After this it takes the last assigned number, even if another user has
> added
> > something between that in between.
> >
> > Therefore the next added number on your grid is not sure the correct
> number
> > when it is not updated, because again another user can have added a row
in
> > the table.
> >
> > I hope this gives the idea?
> >
> > Cor
> >
> > > myDataSet that is fillled from an Access 2000 db and includes ONE
table
> > >
> > > From that Table in myDataSet I create myDataView and use a Rowfilter
to
> > get
> > > a few rows that i work with (i need a DataView cause I do a lot of
> > > filtering)
> > >
> > > The problem is the primary key field (a unique counter), let's call it
> > > "TBL_ID".
> > >
> > > If I, after using the Rowfilter, end up with a DataView that has Zero
> > > records and I start adding a record (thru a datagrid) the TBL_ID field
> in
> > > the DataView will always start on 0... and then count upwards .. 1,
then
> > 2,
> > > then 3.. etc.
> > >
> > > BUT... If I, after using the Rowfilter, end up with a DataView that
has
> > more
> > > than one record, the TBL_ID field in the rows will be the right number
> > from
> > > the Table in the Access Database. If I get only one record and the
> TBL_ID
> > is
> > > 54... the next new record I create will be 55 and etc.... This is how
I
> > want
> > > it to act of course.
> > >
> > > Why will myDataView start on 0 when it has no rows? It's created from
> the
> > > Dataset that might have MANY records with ids...
> >
> >
>
>



Relevant Pages

  • Big problem with accessing DataViews from any "C#" folders using FP2003.
    ... Okay, I am running against a very peculiar problem. ... Click on the page where I wanted to create my DataView, ... In there I would select the folder that contained the Company News ... (You do not have permission to do this operation. ...
    (microsoft.public.sharepoint.portalserver)
  • Re: nbc Book stores and Islam nbc
    ... Robert Wiersema wrote: ... Okay. ... I guess I misunderstood. ... Based on passages like the above, ...
    (rec.music.artists.springsteen)
  • Re: OT:Desperate Housewives
    ... Okay, if he winked then that was what he was getting at. ... LOL ... Maybe I misunderstood. ... - Prince Raphael Corrino, Discourses on Galactic Leadership, ...
    (rec.arts.tv.soaps.cbs)
  • What Control?
    ... Okay maybe I should be using a DataView but I have not got ... am looking to do image a windows form with text boxes displaying the various ... I have tried setting the text property of a label, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: [opensuse] The Missing SUSE manual: Missing documentation?
    ... Okay, I completely misunderstood what was being said. ... says "missing documentation" and I thought it was gone period. ... For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx ...
    (SuSE)