On Tue, Apr 12, 2016 at 11:30 AM, Suliman via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote:
This code compile and run:

try {
       auto result = cmd.executeQuery;
       
           foreach (row; result)
           {
                writeln(row[0]);
                x = row[1].get!(ubyte[]);
           }
       
    }
    catch (ServerErrorException e) {
        // Probably table does not exist - ignore
    }




But I am getting error:

core.exception.OutOfMemoryError@src\core\exception.d(679): Memory allocation failed

Is there any hack that can prevent this error?

Would need to see the full exception stack trace that was printed out. Could you perhaps have an infinite recursion bug in there somewhere?
You should be able to see if you are getting the right type out of the Variant by using something like:
writeln(row[1].type);