Solved

Difference between RecordSet and ResultSets?

Posted on 2004-10-05
7
2,391 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
Comment Utility

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
Comment Utility
ResultSets are RDO
Recordsets are DAO and ADO
0
 
LVL 10

Assisted Solution

by:anv
anv earned 100 total points
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 18

Accepted Solution

by:
Sethi earned 300 total points
Comment Utility
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
Comment Utility
Thanks every one for your help!
0
 
LVL 35

Expert Comment

by:[ fanpages ]
Comment Utility
You're welcome.

Hope you passed the interview.

BFN,

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

Expert Comment

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

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 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…

763 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

10 Experts available now in Live!

Get 1:1 Help Now