# Perform Custom Commands

To execute commands directly on the database, use a script to access the underlying DbConnection class.

    DbConnection connection = $System.GetInternalObject("Databases.FastDatabase") as DbConnection;
    DbCommand customCommand = connection.CreateCommand();
    customCommand.CommandText = "Select * FROM Results";
    DbDataReader reader = customCommand.ExecuteReader();
    while (reader.Read())
    {
    	object[] rowValues = new Object[reader.FieldCount];
    	int fieldCount = reader.GetValues(rowValues);
    }

Note: Leave the connection open, as this is the one used by Designer internally. Designer will fail to detect any changes resulting from a command if you close the connection.