L
Lars Netzel
hi!
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...
How do I fix it? This is a big headache for me right now!
Best Regards
/Lars Netzel
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...
How do I fix it? This is a big headache for me right now!
Best Regards
/Lars Netzel