I just want to loop a dataset

Posted on 2006-04-16
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;;

this doesnt work for me

Whats wrong
Question by:theo1967
    LVL 15

    Accepted Solution

    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.
    LVL 35

    Assisted Solution

    you can use JOIN to loop through a dataset. Here is an example:

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
    This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
    Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
    Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

    734 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

    25 Experts available now in Live!

    Get 1:1 Help Now