On Tuesday, 12 April 2016 at 09:52:53 UTC, Rory McGuire wrote:
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)
                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:

I am getting Out of memory exception even on this code:

writeln(row[0]); // -- works fine

Reply via email to