Program terminated with 0xc000041d (UNKNOWN EXCEPTION)?

0

I have a query which return 4 million+ of rows. When executed in SSMS, it returns without an error. But when using in the application it will exit with error thrown process started at 13:35:14.348 has terminated with 0xc000041d (UNKNOWN EXCEPTION). Put a log file and it ends somewhere when the rows is 1.6 million+ and the columns was 55 million+

Snippet:

for ( long nRows = 1; rc == 0; nRows++, rc = SQLFetch(hStmt) ) {    //Retrieve all rows
    for ( short i = 0; i < nCols; i++ ) {    //Retrieve all columns per rows
        SQLDescribeCol(hStmt, i + 1, NULL, 0, NULL, &type, &precision, &scale, NULL);
        HRESULT hr = FillVariant(hStmt, i + 1, type, precision, scale, options, row + i);
        if ( FAILED(hr) ) {
            return hr;
        }
    }
}
  1. Is this has something to do with the memory address allocation overlapping?
  2. Is it running out of memory?
  3. Is the data type running out? type=short, precision=long, scale=short Have checked existing errors here but they are different.

Thanks

out-of-memory
asked on Stack Overflow Oct 29, 2019 by Joshua

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0