?
Solved

I just want to loop a dataset

Posted on 2006-04-16
5
Medium Priority
?
144 Views
Last Modified: 2010-04-06
When a person clicks on a combo box the data is retrived with out a problem.  then I want to loop the dataset.

var ss=''
  while(business_ds.hasNext()) {
   var  q =  business_ds.currentItem.Question;
   var  a =  business_ds.currentItem.Answer;
    var author =  business_ds.currentItem.Author;
   ss += q;
   ss += a;
   ss += author;
    business_ds.next();
 }

this doesnt work for me

Whats wrong
0
Comment
Question by:theo1967
2 Comments
 
LVL 15

Accepted Solution

by:
deepaknet earned 1000 total points
ID: 16466970
You can not loop through a dataset direct. DataSet constitutes multiple tables and you need to narrow down to the appropriate table and then loop through the records in the particular table.
0
 
LVL 35

Assisted Solution

by:YZlat
YZlat earned 1000 total points
ID: 16469590
you can use JOIN to loop through a dataset. Here is an example:

http://weblogs.sqlteam.com/davidm/archive/2004/01/20/748.aspx
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

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

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

749 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