/*
     * Fetch
     */

    private void OnPerformQuerySuccess(string data)
    {
        string[] DataArray = data.Split(new string[] { SA.Common.Data.Converter.DATA_SPLITTER2 }, StringSplitOptions.None);

        int         dbId = System.Convert.ToInt32(DataArray[0]);
        CK_Database db   = CK_Database.GetDatabaseByInternalId(dbId);

        List <CK_Record> records = new List <CK_Record>();

        for (int i = 1; i < DataArray.Length; i += 2)
        {
            if (DataArray[i] == SA.Common.Data.Converter.DATA_EOF)
            {
                break;
            }

            string name       = DataArray[i];
            string recordData = DataArray[i + 1];

            CK_Record record = new CK_Record(name, recordData);
            records.Add(record);
        }

        CK_QueryResult result = new CK_QueryResult(records);

        db.FireQueryCompleteResult(result);
    }
    private void OnPerformQueryFailed(string data)
    {
        string[] DataArray = data.Split(new string[] { SA.Common.Data.Converter.DATA_SPLITTER2 }, StringSplitOptions.None);


        int         dbId = System.Convert.ToInt32(DataArray[0]);
        CK_Database db   = CK_Database.GetDatabaseByInternalId(dbId);


        string         errorData = DataArray[1];
        CK_QueryResult result    = new CK_QueryResult(errorData);

        db.FireQueryCompleteResult(result);
    }