Community discussion forum

How to access a database to select random questions

  • 7 months ago

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

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 7 months ago

    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

  • 7 months ago

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

    Thanking you

    Shikha

  • 7 months ago

     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 a reply

Enter your message below

Sign in or Join us (it's free).