Solved

Difference between RecordSet and ResultSets?

Posted on 2004-10-05
7
2,462 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
7 Comments
 
LVL 35

Assisted Solution

by:[ fanpages ]
[ fanpages ] earned 50 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 50 total points
ID: 12232619
ResultSets are RDO
Recordsets are DAO and ADO
0
 
LVL 10

Assisted Solution

by:anv
anv earned 100 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 18

Accepted Solution

by:
Sethi earned 300 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

773 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