Hi Pete..

----- Original Message -----
From: Peter M. Jansson <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 25, 2002 4:09 PM
Subject: Re: [AOLSERVER] Error: nsd.tcl: Database operation "0or1row" failed
(exception NSINT)


> On Sun, 24 Feb 2002, Scott S. Goodwin wrote:
>
> > You have logsqlerrors set to true; I guess that's why you're seeing the
> > NSINT in the log file. You'll want to figure out how to identify which
SQL
> > statement causes this error.
>
> The logsqlerrors param is intended to help identify the SQL statement;
> when set to true, logsqlerrors will cause the database module to log the
> SQL statement that caused an error.  It exists so that you don't have to
> keep verbose on in a production system -- you can just turn logsqlerrors
> on, and then you'll see SQL only when there's a problem statement.  (Since
> logsqlerrors only deals with logging of the SQL statement, it has nothing
> to do with the NSINT.)
>
> > With nspostgres, I turn on verbose mode. I don't know if the sybase db
> > module uses the verbose param
>
> The verbose param, like logsqlerrors, is part of the database module, so
> it doesn't matter which driver you're using.
>
> When using the Sybase driver, make sure you're running the nssybpd proxy
> in localdaemon mode; you suffer a big performance hit if you run the proxy
> as a remote daemon because the ns_pd protocol is stop-and-wait.
>
> The ns_pd protocol only allows the database driver to return one error
> message per SQL statement.  Since Sybase can return multiple error
> messages, it logs all of the errors to the syslog, and you only get the
> last one in the AOLserver error log.  Checking the syslog may reveal
> errors that can be corrected that may help things along.
>
> > > ns_param   datasource      "datasource_name"
>
> Datasources for sybase must have the format "SERVER:database" where
> "SERVER" is a Sybase server name, as defined in $SYBASE/interfaces, and
> "database"  is the name of the specific database.  Including the
> database is required; I can't remember the exact behavior, but I think if
> you don't include it the DB won't open.  If there's a problem with the
> datasource name, the syslog may be helpful.
>
Yup, you're right :-). that is just for show about my nsd.tcl config. but my
real config is
ns_param   datasource      "ISSERVER:starDb"

> > > Any way could you explain to me what it does mean with "exception
NISNT"
> > > from email subject?
>
> Sorry I came in late on this.  What was the logged message containing
> NSINT?
>

This is the logged message what I've got.
*********************************************
Error: nsd.tcl: Database operation "0or1row" failed (exception NSINT)
Database operation "0or1row" failed (exception NSINT)
    while executing
"ns_db 0or1row $db $sql"
    invoked from within
"set row [ns_db 0or1row $db $sql]..."
    (procedure "get_payment_method" line 6)
    invoked from within
"get_payment_method "name" $keynr"
    invoked from within
"return [get_payment_method "name" $keynr]..."
*********************************************

> Pete.

FYI, I have create some procedures with the same content except sql
statemant. any procedures which get the error messages like that and some of
them running properly.
*********************************************
* This procedure is resulting error
*********************************************
#----------------------------------------------
proc get_payment_method {id keynr} {
  ns_log Notice "<get_payment_method> for $id"
  set pool "dbase1"
  set db [ns_db gethandle $pool]
  set sql "select distinct $id from paymentmethodsdescr where keynr=$keynr"
  set row [ns_db 0or1row $db $sql]
  if {$row == ""} {
    set return_value 0
  } else {
    set return_value [ns_set value $row 0]
  }
  ns_db releasehandle $db
  return $return_value
}

#----------------------------------------------
proc get_payment_method_name {keynr} {
  return [get_payment_method "name" $keynr]
}
*********************************************

*********************************************
* This procedure is running properly
*********************************************
proc getIdWithLoginName { login_name } {
  ns_log Notice "<getIdWithLoginName> $login_name"

  set pool "dbase1"
  set db [ns_db gethandle $pool]
  set sqlsel "select nr from customer where name='$login_name'"

  ns_log Notice "$sqlsel"
  set row [ns_db 0or1row $db $sqlsel]

  if { $row == ""} {
     set return_value 0
  } else {
     set return_value [ns_set value $row 0]
  }

  ns_db releasehandle $db
  return $return_value
}
*********************************************

Any idea?
TIA Cheers.. :-)

Reply via email to