Hello, I got a similar problem as Roman last year, but this time using sql_unixodbc driver :(.
Function "sql_affected_rows(SQLSOCK *sqlsocket, SQL_CONFIG *config)" everytime returns '0' regardless of mssql query fail or finish properly. sql_affected_rows is calling SQLRowCount function, with seems to not work properly - _it_ returns all the time 0. I'm using FreeTDS 0.60 driver, but 'unfortunately' it works ok for other projects ;( Did anyone meet this this problem before and know a solution ? Or maybe could you propose using other - better - odbc driver instead of FreeTDS ? Best regards, Bangla ----- Original Message ----- From: "Roman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 12:19 PM Subject: postgresql accounting (bug?) > Hi! > I use freeradius 0.5 with postgresql 7.2 on FreeBSD 4.5 > When i run freeradius in dedug mode (radiusd -x), I found that: > 1) freeradius query for Accounting stop packets with > "accounting_stop_query_alt" in any way, regardless of accounting_stop_query > fail or not > > rad_recv: Accounting-Request packet from host x.x.x.x, id=206, length=127 > > query: UPDATE radacct SET AcctStopTime =..... > rlm_postgresql Status: PGRES_COMMAND_OK > sql_postgresql: affected rows = 1 > > query: INSERT into radacct ( AcctSessionId,.... > rlm_postgresql Status: PGRES_FATAL_ERROR > sql_postgresql: affected rows = > > I have not many C experience, but it seems like > sql_affected_rows always 0 for update query > > > rlm_sql.c: > > numaffected = (inst->module->sql_affected_rows)(sqlsocket, inst->config); > if (numaffected < 1) { > /* > * If our update above didn't match anything > * we assume it's because we haven't seen a > * matching Start record. So we have to > * insert this stop rather than do an update > */ > - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html