We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

How to access a database to select random questions

Last post 05-03-2008 2:09 PM by shikha_21. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-01-2008 3:13 PM

    • shikha_21
    • Not Ranked
    • Joined on 05-01-2008
    • India
    • New Member
    • Points 100

    How to access a database to select random questions

    pls help me i m working on a project of online examination .I have a database/Question bank with one column of answer.How do i connect to data base file and the question are selected randomly out of 100 questions...

    • Post Points: 10
  • 05-02-2008 6:33 AM In reply to

    Re: How to access a database to select random questions

    Hi Shikha,

     

    Try using the Random Number generators

     

    Dim a As New System.Random()

    a.Next(0,100)

     

    a.next will return an integer number. Use this returned number as the index to fetch the records from the DataBase.

     

    Regards,

    Vinay

    ComponentOne LLC.

    www.componentone.com

    • Post Points: 10
  • 05-02-2008 12:47 PM In reply to

    • shikha_21
    • Not Ranked
    • Joined on 05-01-2008
    • India
    • New Member
    • Points 100

    Re: How to access a database to select random questions

    thanks Vinay.Can You Write few lines of coding(eg.) for proper guidance>>>

    Thanking you

    Shikha

    • Post Points: 5
  • 05-03-2008 2:09 PM In reply to

    • shikha_21
    • Not Ranked
    • Joined on 05-01-2008
    • India
    • New Member
    • Points 100

    Re: How to access a database to select random questions

     Public class Form2

    dim a as new system.random()

    a.next(0,100)

    statement a.next(0,100) showing a error:that 'a' must be declared

    Now what i do???

    pls write few lines of coding so tht i can better understand....

     

    • Post Points: 5
Page 1 of 1 (4 items)