Cookies


Vsroplus only uses the cookies it needs to keep you signed in and remember your language. No ads, no tracking.

Got it

Need to learn more? Privacy policy

Our guides are in English for now.

Load Questions

By completing this guide, you should be able to understand how Trivia event questions are loaded.

Stored Procedure: _EventTrivia_LoadQuestion
Parameters:

@Question VARCHAR(255) OUTPUT - Loaded question text
@Answer VARCHAR(255) OUTPUT - Loaded answer text

This procedure is used by the Trivia event to load a random question and answer from _RefEventTrivia. You do not need to edit this procedure unless you want to customize how questions are selected.

USE [vPlus]
GO

/****** Object: StoredProcedure [dbo].[_EventTrivia_LoadQuestion] ******/

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:      <Author,,Name>
-- ALTER date:  <ALTER Date,,>
-- Description: <Description,,>
-- =============================================

ALTER PROCEDURE [dbo].[_EventTrivia_LoadQuestion]
    @Question VARCHAR(255) OUTPUT,
    @Answer VARCHAR(255) OUTPUT
AS
BEGIN
    SET NOCOUNT ON;

    SELECT TOP 1 @Question = StrQuestion, @Answer = StrAnswer FROM _RefEventTrivia ORDER BY NEWID();
END

Last updated: 28 March, 2024

An error has occurred. This application may no longer respond until reloaded. Reload 🗙