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;
}
}
}
Thanks
User contributions licensed under CC BY-SA 3.0