T
Trevor Fairchild
Hello all - I've been working in VB6 for about a year and
now I've moved "up" to VB.NET. I think I would have fewer
problems in learning vb.net if I knew nothing about
previous versions of vb...
I have spent a long time now trying to figure out how to
move from one record to another in a vb.net application.
For some reason, Microsoft is big on using Datagrids and
DataTables and so all of their examples cover how to
display the entire contents of a dataset at one time. I,
of course, don't want that - after much hunting, I finally
found the command to navigate from one record to the next
in a dataset - me.bindingcontext
I was ecstatic - finally I could do what I needed to - all
I had to do was use the same code into a Web
Application...
Of course, there is no bindingcontext object for a web
application because the entire contents of the dataset is
copied to the client (apparently...) and so there is no
specific position property to reference.
I have been reading and searching online once again and
have only been able to find a rather simplistic reference
in MSDN that you just have use the dataset to change which
record is being displayed - but no reference to how to
actually do that.
Can anyone help me? It is such a simple thing, I just
don't seem to be able to think of the right word to seach
by.
In the old days, using vbscript, I would just
dim rs
set rs = CreateObject("ADODB.recordset")
rs.open """""
rs.movenext
rs.movelast, etc, etc.
I can bind all of my controls to the appropriate text
boxes, I figured out the Page.DataBind() method to execute
the binding at run-time, everything works, I just can't
move any other record other than the first one in the
dataset.
Can somebody please help me?
Thanks,
Trevor
now I've moved "up" to VB.NET. I think I would have fewer
problems in learning vb.net if I knew nothing about
previous versions of vb...
I have spent a long time now trying to figure out how to
move from one record to another in a vb.net application.
For some reason, Microsoft is big on using Datagrids and
DataTables and so all of their examples cover how to
display the entire contents of a dataset at one time. I,
of course, don't want that - after much hunting, I finally
found the command to navigate from one record to the next
in a dataset - me.bindingcontext
I was ecstatic - finally I could do what I needed to - all
I had to do was use the same code into a Web
Application...
Of course, there is no bindingcontext object for a web
application because the entire contents of the dataset is
copied to the client (apparently...) and so there is no
specific position property to reference.
I have been reading and searching online once again and
have only been able to find a rather simplistic reference
in MSDN that you just have use the dataset to change which
record is being displayed - but no reference to how to
actually do that.
Can anyone help me? It is such a simple thing, I just
don't seem to be able to think of the right word to seach
by.
In the old days, using vbscript, I would just
dim rs
set rs = CreateObject("ADODB.recordset")
rs.open """""
rs.movenext
rs.movelast, etc, etc.
I can bind all of my controls to the appropriate text
boxes, I figured out the Page.DataBind() method to execute
the binding at run-time, everything works, I just can't
move any other record other than the first one in the
dataset.
Can somebody please help me?
Thanks,
Trevor