Re: ODBC Error:23000:-1053: Primary key cant contain null value

Dale E. Reed Jr. ( (no email) )
Tue, 19 May 1998 21:20:56 -0700

Jorge Pocaterra wrote:
> The SQL Statement is
> INSERT INTO calls (CallDate,AcctStatusType,AcctDelayTime,UserName,NasPort,
> AcctSessionID,AcctAuthentic,UserService,AcctSessionTime,FramedProtocol,
> FramedAddress,AcctinputPackets,AccountOutputPackets, AcctInputOctets,
> Acctoutputoctets)Values
> (Now(),2,60,'userlogin',8,'19.08.0',1,2,105,1,'',
> 46,42,3453,31629)
> ODBC Error:23000:-1053:
> [Microsoft][ODBC Microsoft access 97 driver] index or primary key
> can't contain null value

If the debug right above the SQL Statement includes a NAS-IP-Address
attribute (#4) then go into your RadAttributes table and change the
name of attribute #4 from NAS-IP-Address to NAS-Identifier and restart

> i'm also geting other error :
> SQL statement: INSERT INTO RadLogs(RadLogMsgID, LogDate, UserName, Data)
> VALUES (11, Now, 'userlogin', 'password')
> ODBC Error:23000:-1605:
> [Microsoft][ODBC Microsoft access 97 driver] The Changes you requested to
> the table where not succesfull because they would create duplicate values in
> the index, primary key, or relationship. change the data in the field or
> fields that contain duplicate data, remove the index, or redefine the index
> to permit duplicate entries and try again
> But this is hapenning only with the computone PowerRack and not with the
> Totalcontrol and they are authenticating in the same radius ...

This isn't a big deal. By default, the date field in the RadLogs
table is only to the minute. This prevents someone from filling up
your database by continulally giving bad errors. You can change the
data to a more accurate one that includes seconds if you want all of

-- Dale E. Reed Jr.  (       IEA Software, Inc.      |  RadiusNT, Emerald, and NT FAQs Internet Solutions for Today  |