freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] better errors
- Date: Thu, 30 Jun 2005 11:55:20 +0200
>
> > > Lastly, I have a question about TDSMESSAGE::priv_msg_type.
> > > It's written
> > > to 5 times (once in mem.c, 4 in token.c). It's never read.
> > > Anyone have
> > > any idea what it's meant to do? Also, I'd like to
> >
> > It useful to distingue from information to error but it's not used
> > (level is used instead)
>
> OK, then we don't need it.
>
> > > s/msg_level/severity/
> > > and s/msg_number/msgno/ and s/msg_state/state/ if there are
> > > no objections.
> >
> > I agree
>
Mmm... I renamed fields however I noted that some tests for msg_level
(now severity) looks like tests to set priv_msg_type... perhaps it's
better to use this variable instead to test severity? I noted this code
in ODBC (I don't remember where it came...)
if (severity <= 10 && dbc && !TDS_IS_MSSQL(dbc->tds_socket) &&
msg->sql_state && msg->sql_state[0]
&& strncmp(msg->sql_state, "00", 2) != 0) {
if (strncmp(msg->sql_state, "01", 2) != 0 && strncmp(msg->sql_state,
"IM", 2) != 0)
severity = 11;
}
if (severity <= 10) {
if (errs->lastrc == SQL_SUCCESS)
errs->lastrc = SQL_SUCCESS_WITH_INFO;
} else {
errs->lastrc = SQL_ERROR;
}
Perhaps priv_msg_type was intended for that purpose ??
freddy77
-
[freetds] better errors,
James K. Lowden, 06/28/2005
- <Possible follow-up(s)>
-
RE: [freetds] better errors,
ZIGLIO, Frediano, VF-IT, 06/28/2005
- Re: [freetds] better errors, James K. Lowden, 06/29/2005
- Re: [freetds] better errors, liam, 06/30/2005
- Re: [freetds] better errors, ZIGLIO, Frediano, VF-IT, 06/30/2005
- Re: [freetds] better errors, ZIGLIO, Frediano, VF-IT, 06/30/2005
- Re: [freetds] better errors, Lowden, James K, 06/30/2005
- Re: [freetds] better errors, Lowden, James K, 06/30/2005
Archive powered by MHonArc 2.6.24.