473,804 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 13327
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).ro ws
i += cint(r(0))
next
"Wim Van der Elst" <wi*******@skyn et.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).ro ws(i) < ds.tables.rowsc ount then
myitem = ds.tables(0).ro ws(i+1)("mydata baseItem")
end if
///
for a previous
if i>0
myitem = ds.tables(o).ro ws(i-1)("mydatabaseI tem")
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.publi c.dotnet.framew ork.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*******@skyn et.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
5628
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
1593
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 displayed immediately to the right of then first recordset with the first rows or each at the same level. Recordset3 is displayed to the right of Recordset2 and so on. There is no set limit to the number of possible recordsets (or columns to...
6
2949
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. One case where this happened to me today was in trying to store disconnected recordsets in a cache collection in case they are needed again later in the same session. When I retrieve the recordset from the collection, it's empty. On the other...
2
1769
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 code from ADH2000... I will be opening like 8 recordsets {one for each building, and there are 8). Would I be better off or is there anything to be gained by opening one recordset of the query with _all_ the records in it, filtering that, and...
1
2078
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 readers and found that my C# code takes only about 35% of the time that the old C++ program took to execute. I'm amazed at this performance improvement, but finding it hard to believe. I'm supposed to make a recommendation based on my test results.
16
5728
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 got a nudge in the right direction from Mr. Kreft. I promised to provide details once working, so here it is. The code is shown below. My next step is to build this technique into my application. I'm hoping for substantial performance gain. ...
24
8516
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 workaround for lack of a way to define the ordinal position of a field (incrementing a counter variable), but it feels so primitive: dim Fld as Field dim rst1 as new adodb.recordset
4
1517
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 have a textbox for searching, a listbox to display the searched results, and a big textbox (memo) to display the clicked-results of the listbox item. My question is: should I load the controls with objects, and therefore store everything in...
4
2445
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* where * is a wildcard for letters after rs. Thanks. -- Message posted via AccessMonster.com
11
3142
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 (SP3)). I have successfully created 3 recordsets in my database. What I need to do is to take the data from those 3 recordsets and put them into a table so that I can run reports at a later time. I was able to create the recordsets and the table with...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9577
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10315
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9140
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.