 			int len = _strlen(colNames[i] ? colNames[i] : "");
 			if (len > w) w = len;
 		}
-		if (p->Cnt++ > 0) _fprintf(p->Out, "\n");
+		if (p->Cnt++ > 0) _fprintf(p->D_Out, "\n");
 		for (i = 0; i < colLength; i++)
-			_fprintf(p->Out, "%*s = %s\n", w, colNames[i], colValues[i] ? colValues[i] : p->NullValue);
+			_fprintf(p->D_Out, "%*s = %s\n", w, colNames[i], colValues[i] ? colValues[i] : p->NullValue);
 		break; }
 	case MODE_Explain:
 	case MODE_Column: {

	case MODE_List: {
		if (p->Cnt++ == 0 && p->ShowHeader)
			for (i = 0; i < colLength; i++)
				_fprintf(p->Out, "%s%s", colNames[i], (i == colLength-1 ? "\n" : p->Separator));
		if (colValues == 0) break;
		for (i = 0; i < colLength; i++)
		{
			char *z = colValues[i];
			if (!z) z = p->NullValue;
			_fprintf(p->Out, "%s", z);
			if (i < colLength-1) _fprintf(p->Out, "%s", p->Separator);
			else if (p->Mode == MODE_Semi) _fprintf(p->Out, ";\n");
			else _fprintf(p->Out, "\n");
		}
		break; }
	case MODE_Html: {
		if (p->Cnt++ == 0 && p->ShowHeader)
		{
			_fprintf(p->Out, "<TR>");
			for (i = 0; i < colLength; i++)
			{
				_fprintf(p->Out, "<TH>");
				OutputHtmlString(p->Out, colNames[i]);
				_fprintf(p->Out, "</TH>\n");
			}
			_fprintf(p->Out, "</TR>\n");
		}
		if (colValues == 0) break;
		_fprintf(p->Out, "<TR>");
		for (i = 0; i < colLength; i++)
		{
			_fprintf(p->Out, "<TD>");
			OutputHtmlString(p->Out, (colValues[i] ? colValues[i] : p->NullValue));
			_fprintf(p->Out, "</TD>\n");
		}
		_fprintf(p->Out, "</TR>\n");
		break; }
	case MODE_Tcl: {
		if (p->Cnt++ == 0 && p->ShowHeader)
		{
			for (i = 0; i < colLength; i++)
			{
				OutputCString(p->Out, (colNames[i] ? colNames[i] : ""));
				if (i < colLength-1) _fprintf(p->Out, "%s", p->Separator);
			}
			_fprintf(p->Out, "\n");
		}
		if (colValues == 0) break;
		for (i = 0; i < colLength; i++)
		{
			OutputCString(p->Out, (colValues[i] ? colValues[i] : p->NullValue));
			if (i < colLength-1) _fprintf(p->Out, "%s", p->Separator);
		}
		_fprintf(p->Out, "\n");
		break; }
	case MODE_Csv: {
		if (p->Cnt++ == 0 && p->ShowHeader)
		{
			for (i = 0; i < colLength; i++)
				OutputCsv(p, (colNames[i] ? colNames[i] : ""), i < colLength-1);
			_fprintf(p->Out, "\n");
		}
		if (colValues == 0) break;
		for (i = 0; i < colLength; i++)
			OutputCsv(p, colValues[i], i < colLength-1);
		_fprintf(p->Out, "\n");
		break; }
	case MODE_Insert: {
		p->Cnt++;
		if (colValues == 0) break;
		_fprintf(p->Out, "INSERT INTO %s VALUES(", p->DestTable);
		for (i = 0; i < colLength; i++)
		{
			char *sep = (i > 0 ? "," : "");
			if ((colValues[i] == 0) || (colTypes && colTypes[i] == TYPE_NULL))
				_fprintf(p->Out, "%sNULL", sep);
			else if (colTypes && colTypes[i] == TYPE_TEXT)
			{
				if (sep[0]) _fprintf(p->Out, "%s", sep);
				OutputQuotedString(p->Out, colValues[i]);
			}
			else if (colTypes && (colTypes[i] == TYPE_INTEGER || colTypes[i] == TYPE_FLOAT))
				_fprintf(p->Out, "%s%s", sep, colValues[i]);
			else if (colTypes && colTypes[i] == TYPE_BLOB && p->Stmt)
			{
				const void *blob = Vdbe::Column_Blob(p->Stmt, i);
				int blobLength = Vdbe::Column_Bytes(p->Stmt, i);
				if (sep[0]) _fprintf(p->Out, "%s", sep);
				OutputHexBlob(p->Out, blob, blobLength);
			}
			else if (isNumber(colValues[i], 0))
				_fprintf(p->Out, "%s%s", sep, colValues[i]);
			else
			{
				if (sep[0]) _fprintf(p->Out, "%s", sep);
				OutputQuotedString(p->Out, colValues[i]);
			}
		}
		_fprintf(p->Out, ");\n");
		break; }
	}
	return false;

			if (arg && arg->EchoOn)
			{
				const char *stmtSql = Vdbe::Sql(stmt);
				_fprintf(arg->D_Out, "%s\n", (stmtSql ? stmtSql : sql));
			}

			// Output TESTCTRL_EXPLAIN text of requested
