Is this only for the "catch" info in Tcl? In the server log it is still
reported with the orriginal server message, one error before the "not
returning rows" one.
Bas.
Jim Wilcoxson said:
> In one of the 3.x releases, I think after 3.2, AS stopped reporting
> the details of SQL select errors. Instead of giving the detailed
> SQL error, like "expected comma after blah", AS started reporting
> "Query was not a statement returning rows." This isn't very useful
> for error trapping and reporting.
>
> Here's a patch to go back to the old behavior. Not sure whether this
> even applies to 4x.
>
> *** dbdrv.c.~1~ Tue Jan 16 10:14:27 2001
> --- dbdrv.c Tue Dec 9 10:34:35 2003
> ***************
> *** 367,368 ****
> --- 367,369 ----
> Ns_Set *setPtr = NULL;
> + int status = NS_ERROR;
>
> ***************
> *** 371,377 ****
> if (driverPtr->execProc != NULL) {
> ! if (Ns_DbExec(handle, sql) == NS_ROWS) {
> ! setPtr = Ns_DbBindRow(handle);
> ! } else {
> Ns_DbSetException(handle, "NSDB",
> "Query was not a statement returning rows.");
> }
> --- 372,379 ----
> if (driverPtr->execProc != NULL) {
> ! status = Ns_DbExec(handle, sql);
> ! if (status == NS_DML) {
> Ns_DbSetException(handle, "NSDB",
> "Query was not a statement returning rows.");
> + } else if (status == NS_ROWS) {
> + setPtr = Ns_DbBindRow(handle);
> }
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to
> <[EMAIL PROTECTED]> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the
> Subject: field of your email blank.
>
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of
your email blank.