473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

VB.NET and recordsets ...

Hello,
I want to start working in VB.net but seem to have
trouble in understading how I get to an equivalent of a
recordset as in VB6.
The only examples I find are working with binding, but
that is not what I want to do.
I want to be able to create a recordset and go forward
and backwords through it and us it in while not .EOF
structure as I did befor in VB6.
How is this done in VB.NET. Any axemples out there?

Wim
Nov 20 '05 #1
5 13303
that would be a dataset or a dataview

considering your remark about EOF you can use a dataset like this

dim ds as new dataset
'fill your dataset
dim r as datarow
dim i as integer

for each r in ds.tables(0).rows
i += cint(r(0))
next
"Wim Van der Elst" <wi*******@skynet.be> wrote in message
news:0a****************************@phx.gbl...
Hello,
I want to start working in VB.net but seem to have
trouble in understading how I get to an equivalent of a
recordset as in VB6.
The only examples I find are working with binding, but
that is not what I want to do.
I want to be able to create a recordset and go forward
and backwords through it and us it in while not .EOF
structure as I did befor in VB6.
How is this done in VB.NET. Any axemples out there?

Wim

Nov 20 '05 #2
Cor
Hi Wim,

It is not impossible to use a recordset, but strongly advices to do not.

With a dataset you can do the same as with a recordset. It is not so often
given as example, but I think the example I give you bellow works even
better than a recordset. This is an example as addition to Eric, but there
are so much possibilities to handle data, that I don't think there is
someone who knows them all.
I want to be able to create a recordset and go forward
and backwords through it and us it in while not .EOF
structure as I did befor in VB6.


Another example than EricJ
dim i as integer = currentrow

for a next
\\\\
if ds.tables(0).rows(i) < ds.tables.rowscount then
myitem = ds.tables(0).rows(i+1)("mydatabaseItem")
end if
///
for a previous
if i>0
myitem = ds.tables(o).rows(i-1)("mydatabaseItem")
end if
///
I think the rest you understand.

I hope this helps a little bit?

Cor



Nov 20 '05 #3
Hi mate,
i had trouble getting round this, got to accept the idea
of recordsets is replaced with datasets.
Similar to recordsets but improved as yuou can now have a
collection of tables rather than the 1 table.
Have a read on datasets (guess this is the inheritor of
recordsets from vb6)
regards

Adam

-----Original Message-----
Hello,
I want to start working in VB.net but seem to have
trouble in understading how I get to an equivalent of a
recordset as in VB6.
The only examples I find are working with binding, but
that is not what I want to do.
I want to be able to create a recordset and go forward
and backwords through it and us it in while not .EOF
structure as I did befor in VB6.
How is this done in VB.NET. Any axemples out there?

Wim
.

Nov 20 '05 #4
Hi Wim ,

In addition tho the posts already made. I suggest that you obtain an ADO.NET
book and read through. It's a little tough to start out but you will get
there. Also, for ADO type posts for .NET framework such as this one, you
really need to post to

microsoft.public.dotnet.framework.adnotnet

Regards - OHM

Wim Van der Elst wrote:
Hello,
I want to start working in VB.net but seem to have
trouble in understading how I get to an equivalent of a
recordset as in VB6.
The only examples I find are working with binding, but
that is not what I want to do.
I want to be able to create a recordset and go forward
and backwords through it and us it in while not .EOF
structure as I did befor in VB6.
How is this done in VB.NET. Any axemples out there?

Wim

Nov 20 '05 #5
Wim,
To further OHM's comments, I find David Sceppa's book "Microsoft ADO.NET -
Core Reference" from MS Press to be an excellent resource for everything
ADO.NET. It is a easy read to learn ADO.NET, plus it is a good desk
reference while working with ADO.NET.

Hope this helps
Jay

"Wim Van der Elst" <wi*******@skynet.be> wrote in message
news:0a****************************@phx.gbl...
Hello,
I want to start working in VB.net but seem to have
trouble in understading how I get to an equivalent of a
recordset as in VB6.
The only examples I find are working with binding, but
that is not what I want to do.
I want to be able to create a recordset and go forward
and backwords through it and us it in while not .EOF
structure as I did befor in VB6.
How is this done in VB.NET. Any axemples out there?

Wim

Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Marco Alting | last post by:
Is it possible to INNER JOIN two recordsets in ASP? I don't mean the normal JOIN you would use with two tables, but actually join the recordsets in ASP?
2
by: Steve Marciniak | last post by:
I'm trying to display different recordsets (which are 1 field each) as columns right next to one another. For example, Recordset1 is displayed on the left hand side of the screen. Recordset2 is...
6
by: Steve Jorgensen | last post by:
I keep having problems in which ADO disconnected recordset work under some circumstances, but lose all their data at other times, having no rows or fields, though the recordset object still exists....
2
by: Pieter Linden | last post by:
The answer to this one is probably "test it yourself and find out!", but I'll ask anyway. Pursuant to my previous question - sending separate recordsets to Word using the CreateTableFromRecordset...
1
by: lakshmi | last post by:
Hi all, I recently rewrote a data intensive C++ program in C#. The C++ program was traversing 3 recordsets that were all open at the same time. I replaced those 3 recordsets with 3 .NET data...
16
by: Randy Harris | last post by:
I was inspired by the recent discussion of returning multiple recordsets to ADO from a stored procedure. (Amazed is probably more accurate). I asked about how to accomplish same with Oracle and...
24
by: Donald Grove | last post by:
I want to populate an array with values from an ado recordset (multiple rows) I use the absolute position of the cursor in the recordset to define the row of my array to be populated. I have a...
4
by: mrmagoo | last post by:
I'm building a vb.net Forms project that is getting data from a SQL Server database. One of the main goals of the project is to be really responsive to events, such as textbox change events. I...
4
by: rdemyan via AccessMonster.com | last post by:
Can someone help me with creating code that will look for DAO recordsets in modules and then check to see if the recordset is also closed in the module. All of my recordsets are of the form rs*...
11
by: BeckR | last post by:
Hello - Thanks for reading my post. I am a newbie when it comes to VBA programming, but have managed to do what I need to do, until now. I have an Access 2000 database (running WinXP Pro...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.