Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello ,

i need to know the equivalent function for Recordset.MovePrevious(Vb6) in c#.net.

or let me know how to get previous value from data-set in c#.net

What I have tried:

i have looked into many places but was not able to find the answer
Posted
Updated 30-Mar-17 4:23am
Comments
Garth J Lancaster 30-Mar-17 1:06am    
you havnt included any code so its a bit hard to help

a 2 second Google show this https://msdn.microsoft.com/en-us/library/ee275538(v=bts.10).aspx which would suggest there is an Equivalent for your VB
Member 12238409 30-Mar-17 1:08am    
There is not much code Moveprevious.recordset is a function to the previous value in the recordset
Tomas Takac 30-Mar-17 2:41am    
I don't think there is any. You need to learn how data access works in .NET from scratch.
http://stackoverflow.com/a/14932728

1 solution

If you had shared your code that populates your RecordSet we could have shown you how to convert the VB6 code to .NET.

However, Tomas Takac has provided a very good reference to help you
.Net equivalent of VB6 Recordset - Stack Overflow[^]

There is no real concept of moving through a DataSet or DataTable in the same way that a RecordSet is handled. You can just access the rows directly by their index...E.g.
C#
DataRow row  = dt.Rows[2];
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900