Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Difference between RecordSet and ResultSets?

Posted on 2004-10-05
7
Medium Priority
?
2,753 Views
Last Modified: 2008-01-09
Hi EveryOne,
Otherday I had a interview. They asked me few questions, some question needs extensive knowledge. Which i don't have being a newbie...

I would like to get remarks from experts on these questons (Visual Basic 6 OR .NET)


- Difference between RecordSet and ResultSets?

Regards,
0
Comment
Question by:ExpertPro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 35

Assisted Solution

by:[ fanpages ]
[ fanpages ] earned 200 total points
ID: 12231306

I'm guessing that they meant that Recordsets can be updateable (optionally) whereas Results sets are usually read only.

Not necessary VB or .NET specific, though.
0
 
LVL 18

Assisted Solution

by:JR2003
JR2003 earned 200 total points
ID: 12232619
ResultSets are RDO
Recordsets are DAO and ADO
0
 
LVL 10

Assisted Solution

by:anv
anv earned 400 total points
ID: 12234219
follwing for preparation for ur interviews

http://www.techinterviews.com/index.php?p=49

http://visualbasic.ittoolbox.com/nav/t.asp?t=330&p=322&h1=330&h2=322

about ur question..

i'm not sure , but in VB 6 their is nothing like resultset..

Recordset is an object that stores the ResultSet of a particular query that pass to it..

This is what i believe it could be..

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Accepted Solution

by:
Sethi earned 1200 total points
ID: 12246662
I was rejected in an interview some 5 years because I didn't know the difference between the two. I thne slogged hard and found the differnece from various sources. Here are my notes on the difference:

As the name suggests Result Set means 'The results of a query'. i.e when we use a Select statement to fetch some records from the database the records are returned in the form of result set.

Result sets contain rows of data when a Select query is fired. If no matching records are found by the Select statement, then resultsets are empty.
Action queries do not return rows but they do return result sets that contain information about the operation, such as no. of rows affected by the action query.

With result sets, there is no "next row" concept, nor is there any way to operate on individual rows of a result set. This is where the use of 'Cursors' comes in.

Cursors solve the problem posed by a result set (you cant work with individual rows) by exposing the entire result set so that your application can use rows in the result set in a manner similar to using records in a sequential file.
For example, consider an application that displays a list of available products to a potential buyer. The buyer scrolls through the list, drilling down to get product details and cost, and finally selects a product for purchase. Additional scrolling and selection occurs for the remainder of the list. Notice that as far as the buyer is concerned the products are appearing one at a time, but the application is using a scrollable cursor to browse up and down through the result set.

Because there are many ways for a cursor to interact with the result set and your application, there are many types of cursors that your application can use. They can be used for retrieval, updation, deletion and insertion depending on the type we use.
As a general rule, your application should use the simplest cursor that provides the required data access. Each additional cursor characteristic beyond the basics (static, read-only, forward-only, scrolling, unbuffered) has a price - either in client memory, network load, or performance. In many cases, the default cursor options generate a far more complex cursor than your application actually needs.

Q. What is the relationship or difference between a Recordset and a Cursor ??
A. Recordsets are objects that use 'Cursors' to retrieve, insert and delete data from the database. i.e it is an object oriented interface to Cursor, like ADO is to OLEDB. We can either directly use Cursors or use Recordsets instead. As Recordsets are more easy to use and are as powerful as cursors, we normally they are preferred over Cursors.


Hope this helps :-)
0
 
LVL 1

Author Comment

by:ExpertPro
ID: 12331159
Thanks every one for your help!
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 12332667
You're welcome.

Hope you passed the interview.

BFN,

fp.
[ http://NigelLee.info ]
0
 
LVL 18

Expert Comment

by:Sethi
ID: 12332747
ExperPro, do update us when you pass the interview. Best of luck :-)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question