About Tigran

Hi there, I’m Tigran. I’m a Computer Science student at the¬†Utrecht University and an aspiring game developer.

As I learn new things about game development, I want to write about these, mostly tutorials or guides. I’ll also post new games I created and other game development related stuff as I slowly climb the ladder of the game industry.

Enjoy and feel free to leave a comment!

  • RoLofHearth

    Hello,

    I try to adapte your code to sqlite in c#, to show in listbox in windows form, but im noob and cant do it.

    Can you help me for this ?

    Code :
    namespace SQLiteSamples
    {
    class Program
    {
    // Maintient la connexion
    SQLiteConnection m_dbConnection;

    static void Main(string[] args)
    {
    Program p = new Program();
    }

    public Program()
    {
    connectToDatabase();
    printConsole();
    }

    // Creates a connection with our database file.
    void connectToDatabase()
    {
    m_dbConnection = new SQLiteConnection(“Data Source=login.sqlite;Version=3;”);
    m_dbConnection.Open();
    }

    // Affiche les noms et login dans la console
    void printConsole()
    {
    string sql = “select * from MYDATA order by Nom desc”;
    SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection);
    SQLiteDataReader reader = command.ExecuteReader();
    while (reader.Read())
    Console.WriteLine(“Nom: ” + reader[“Nom”] + ” Login: ” + reader[“Login”]);
    Console.ReadLine();
    }
    }
    }

    Thx a lot for this.
    Regards