Solved

Difference between RecordSet and ResultSets?

Posted on 2004-10-05
7
2,432 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now