using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;

public partial class StoredProcedures
{
    [Microsoft.SqlServer.Server.SqlProcedure]
    public static void spAddRecordToCache (string projName, string mergedValues)
    {
        string[] values = mergedValues.Split(new string[] { UserDefinedFunctions.GetSeparator() }, StringSplitOptions.None);
        try
        {
            var wrapper = new ServiceWrapper.Wrapper();
            wrapper.AddToCachedTable(projName, values);

        }
        catch (Exception ex)
        {
            SqlContext.Pipe.Send(ex.Message);
        }
    }
}
