<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 12, 2016 at 11:30 AM, Suliman via Digitalmars-d-announce <span dir="ltr"><<a href="mailto:digitalmars-d-announce@puremagic.com" target="_blank">digitalmars-d-announce@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">This code compile and run:<span class=""><br>
<br>
try {<br>
       auto result = cmd.executeQuery;<br>
        <br>
           foreach (row; result)<br>
           {<br>
                writeln(row[0]);<br></span>
                x = row[1].get!(ubyte[]);<span class=""><br>
           }<br>
        <br>
    }<br>
    catch (ServerErrorException e) {<br>
        // Probably table does not exist - ignore<br>
    }<br>
<br>
<br>
<br>
<br>
But I am getting error:<br>
<br></span>
core.exception.OutOfMemoryError@src\core\exception.d(679): Memory allocation failed<br>
<br>
Is there any hack that can prevent this error?<br>
</blockquote></div><br></div><div class="gmail_extra">Would need to see the full exception stack trace that was printed out. Could you perhaps have an infinite recursion bug in there somewhere?</div><div class="gmail_extra">You should be able to see if you are getting the right type out of the Variant by using something like:</div><div class="gmail_extra">writeln(row[1].type);</div><div class="gmail_extra"><br></div></div>