[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Difference between RecordSet and ResultSets?

Posted on 2004-10-05
7
Medium Priority
?
2,807 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 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month19 days, 20 hours left to enroll

873 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