Lou
Mon Dec 06 18:17:35 CST 2004
My current app uses a disconnecte recordset, there is no DB, i just like
using the ADODB.Recordset
object's methods tied to a grid where the grids cursor follows the Recordset
cursor.
Dim PL As ADODB.Recordset
PL.Fields.Add("Etc")
'Add some data
'Set the grids DataSource
Set Grid.Datasource=PL
Now the grid mirrors the Recordset, including the cursor position
I then use Recordset clones and all the good stuf with ADO.
"Sahil Malik" <contactmethrumyblog@nospam.com> wrote in message
news:O9PrPn82EHA.1400@TK2MSFTNGP11.phx.gbl...
> Hi Lou,
>
> The closest equivalent atleast as far as similar to programming technique
> goes is DataReader.
>
> DataSet introduces a different method of accessing data, in which you get
> this sort of like a mini rdbms in memory with a collection of tables and
> relations - tables can have constraints on them even. Then you can access
> data inside the dataset by using something like
>
> DataSet.Tables[0].Rows[0][0] <--- Gives you the value of the first table,
> first row, first column .. so on so forth.
>
> The biggest plus to the dataset is it is COMPLETELY disconnected from the
> d/b, so it lends itself very well to distributed programming. Also it is
> extremely good at maintaining state changes (delete/add/modify etc.) ..
for
> more on this you can read DataViewRowState Constants in MSDN.
>
> ADO.NET is fantastic compared to ADO, but true it takes some getting used
> to. I recommend buying a book :-)
>
> - Sahil Malik
>
http://dotnetjunkies.com/weblog/sahilmalik
>
http://blogs.apress.com/authors.php?author=Sahil Malik
>
>
>
>
> "Lou" <lou.garvin@comcast.net> wrote in message
> news:dPOdnYupW-E5OCncRVn-iQ@comcast.com...
> > I need to convert a VB6 Disconnected Recordset project to C#.
> >
> > The VB6 app uses ADO to create a recordset, add fields, add data.
> > It then Binds to a grid.
> >
> > The VB6 App uses the client side cursor. When ever I move through the
> > Recordset
> > using (MoveNext,MovePrevious,Find) th Grids cursor position mirrors the
> > recordset
> > row. I can't seem to duplicate this in C#. I can create a Dataset, add
> > fields, add data
> > and use the "Find" method and bind the datagrid BUT the grids cursor
> doesn't
> > track.
> > Also I can't find the Navigate functions in the
> > Dataset(MoveNext,MovePrevious,EOF,BOF)
> > I really need those.
> > is there a "Cursor" in the Dataset?
> > I am somewhat confused, I'm still thinking in the older ADO world...
> >
> > Can someone point me in the right direction?
> > Thanks...
> >
> > -Lou
> >
> >
>
>