Help with SQLite for Android Errors in Unity3D?

Hi guys! I am trying to adapt a script to work with SQLite4Unity3D but I am struggling with 3 errors. I was wondering if anyone could help. Here is the script. I have adapted it as far as I could:

 using UnityEngine;
 using SQLite4Unity3d;
 using System;
 
 public class QuizStart : MonoBehaviour
 {
 
     private SQLiteConnection connection;
     private int[] rowIndices;
     private int questionIndex;
 
 
     void Start()
     {
         // Initialization
         string connectionString = "URI=file:" + Application.dataPath + "/quizz.db";
         connection = (SQLiteConnection)new SQLiteConnection(connectionString);
         connection.Open();
 
         InitializeQuestions();
 
         // Execute GetNextQuestion when you need to access the next question
         GetNextQuestion();
     }
 
     void OnDestroy()
     {
         connection.Close();
     }
 
     private void InitializeQuestions()
     {
         // Retrieve amount of questions
         SQLiteCommand cmd = connection.CreateCommand();
         cmd.CommandText = "SELECT COUNT(*) FROM english";
         var count = (Int64)cmd.ExecuteScalar();
 
         // Generate a shuffled array of question indices.
         rowIndices = new int[count];
         for (int i = 0; i < count; i++)
             rowIndices *= i;*

Shuffle(rowIndices);
}

public void GetNextQuestion()
{
// Read question from database. Do note that you’ll have to use your own columns here.
SQLiteCommand dbcmd = connection.CreateCommand();
string sqlQuery = string.Format("SELECT * " + “FROM english LIMIT 1 OFFSET {0}”, rowIndices[questionIndex]);
dbcmd.CommandText = sqlQuery;
using (IDataReader reader = dbcmd.ExecuteReader())
{
reader.Read();
string question = reader.GetString(1);
Debug.Log("question: " + question);
reader.Close();
}

questionIndex++;
if (questionIndex > rowIndices.Length)
questionIndex = 0;
}

private static void Shuffle(T[] array)
{
var rnd = new System.Random();
int n = array.Length;
while (n > 1)
{
int k = rnd.Next(n–);
T temp = array[n];
array[n] = array[k];
array[k] = temp;
}
}
}
My 3 errors are with :
CreateCommand() ll. 34 and 47/
ExecuteScalar l. 36/
IDataReader l. 51
Thanks for any help! :slight_smile:

Hello! facebook corner of the edit settings button. you can change at that place