Sorry, that was not really right.
"The severity level of an error message provides an indication of the
type of problem that Microsoft(r) SQL Server™ 2000 has encountered.
Severity level 10 messages are informational and indicate problems
caused by mistakes in the information you have entered. Severity
levels from 11 through 16 are generated by the user, and can be
corrected by the user."
I remember experimenting and finding that it was safe to consider
error levels 1 - 10 "Notice" information and > 10 always indicating a
real "Error" that should be returned to the caller.
On 5/25/05, Ian Harding <[EMAIL PROTECTED]> wrote:
> >10 indicates a critical error.
>
> On 5/25/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
> > Why msg_level > 10, why 10, and not 0?
> >
> > Ian Harding wrote:
> > > Vlad,
> > >
> > > I installed 0.63 and compiled and installed your module.
> > >
> > > It seems to work fine, but has a glitch I ran into as well which is
> > > that it doesn't return error codes when something went wrong with the
> > > query itself. For example, with my hack I get this
> > >
> > > SQL:
> > >
> > > SELECT cast('foo' as int)
> > >
> > > Results:
> > >
> > > error: Database operation "exec" failed (exception NSDB, "Syntax
> > > error converting the varchar value 'foo' to a column of data type
> > > int.")
> > >
> > > Rows affected: -1
> > >
> > > With your version I get
> > >
> > > SQL:
> > >
> > > SELECT cast('foo' as int)
> > >
> > > Results:
> > >
> > > Rows affected: -1
> > >
> > > While the log indicates
> > > [25/May/2005:12:46:20][17746.1090534320][-conn:server1::0] Notice:
> > > Db_Msg_Handler(fundware): Syntax error converting the varchar value
> > > 'foo' to a column of data type int.
> > >
> > > This has to do with a fundamental change in error handling where
> > > non-network communication errors are not errors to freetds anymore.
> > > They are simply passed back to the application for it to handle.
> > >
> > > Here is my hack which seems to work but may be terribly wrong for other
> > > reasons.
> > >
> > > int
> > > Ns_FreeTDS_Msg_Handler(TDSCONTEXT *ctx, TDSSOCKET *tds, TDSMESSAGE *msg)
> > > {
> > > Ns_DbHandle *handle = (Ns_DbHandle *) tds->parent;
> > >
> > > Ns_Log(Notice, "nsfreetds: Ns_FreeTDS_Msg_Handler(%s): %s",
> > > handle->datasource, msg->message);
> > >
> > > // Begin hack
> > > if ( msg->msg_level > 10 )
> > > Ns_DbSetException(handle, "NSDB", msg->message);
> > > // End hack
> > >
> > > return 0;
> > > }
> > >
> > >
> > >
> > >
> > > On 5/25/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
> > >
> > >>Try newest FreeTDS 0.63 with my modified nsfreetds driver.
> > >>
> > >>http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/
> > >>
> > >>It does not support interfaces anymore, use freetds.conf and describe
> > >>datasource there.
> > >>
> > >>---- nsd.tcl
> > >>
> > >>ns_section "ns/db/pool/cbill"
> > >>ns_param driver freetds
> > >>ns_param connections 10
> > >>ns_param user cbill
> > >>ns_param password cbill
> > >>ns_param datasource Billing
> > >>ns_param verbose Off
> > >>ns_param logsqlerrors On
> > >>ns_param maxidle 31536000
> > >>
> > >>---- freetds.conf
> > >>[Billing]
> > >> host = cbill
> > >> port = 1433
> > >> tds version = 7.0
> > >>
> > >>Cory Grimster wrote:
> > >>
> > >>>Hi everyone,
> > >>>
> > >>>I'm having trouble getting nsfreetds running, and I'm hoping that
> > >>>someone can spot what I'm doing wrong. I noticed that several people on
> > >>>the list have gotten it working at various times, so I assume it's just
> > >>>me.
> > >>>
> > >>>I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
> > >>>won't compile on this server) and AOLserver 4.0.10
> > >>>running on Mandrake 10.0. I'm trying to connect to Microsoft SQLServer
> > >>>Desktop Engine 2000 SP4 running on my Windows XP workstation. I'm
> > >>>getting the "could not allocate a handle from database pool "pool4""
> > >>>error page when I hit my site.
> > >>>
> > >>>I can connect to the SQL server with tsql, though it doesn't give me any
> > >>>output when I type in SQL commands. Not sure what that's about.
> > >>>Authentication works fine, and it rejects me if I don't give it the
> > >>>correct credentials. Anyway, I'm assuming that it works for now and am
> > >>>trying to get nsfreetds working.
> > >>>
> > >>>The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
> > >>>are as follows:
> > >>>
> > >>>ns_section ns/db/drivers
> > >>> ns_param freetds ${bindir}/nsfreetds.so
> > >>>
> > >>>ns_section ns/db/pools
> > >>> ns_param pool4 "FreeTDS Pool"
> > >>>
> > >>>ns_section ns/db/pool/pool4
> > >>> ns_param maxidle 1000000000
> > >>> ns_param maxopen 1000000000
> > >>> ns_param connections 5
> > >>> ns_param verbose $debug
> > >>> ns_param extendedtableinfo true
> > >>> ns_param logsqlerrors $debug
> > >>>
> > >>> ns_param driver freetds
> > >>> ns_param datasource fooserver [also tried fooserver:bardb]
> > >>> ns_param user sa
> > >>> ns_param password bazpassword
> > >>>
> > >>>ns_section ns/server/${server}/db
> > >>> ns_param pools "*"
> > >>> ns_param defaultpool pool4
> > >>>
> > >>>I have the SYBASE environment variable set to /usr/local/etc, which is
> > >>>where my interfaces file lives. It looks like this:
> > >>>
> > >>>fooserver
> > >>> query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
> > >>>4.2 instead of 8.0 and it makes no difference]
> > >>>
> > >>>Hopefully someone can point me in the right direction. I've been
> > >>>banging my head against it for a few days now and I'm afraid that I'm
> > >>>missing something obvious but am at a loss as to what it might be.
> > >>>
> > >>>Thanks in advance,
> > >>>
> > >>>-Cory
> > >>>
> > >>>
> > >>>--
> > >>>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.
> > >>
> > >>--
> > >>Vlad Seryakov
> > >>571 262-8608 office
> > >>[EMAIL PROTECTED]
> > >>http://www.crystalballinc.com/vlad/
> > >>
> > >>
> > >>--
> > >>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.
> >
> > --
> > Vlad Seryakov
> > 571 262-8608 office
> > [EMAIL PROTECTED]
> > http://www.crystalballinc.com/vlad/
> >
> >
> > --
> > 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.