(RADIATOR) Values Disappearing

Nathan 'Franko' Franklin radiator_tsn at tsn.cc
Tue Apr 1 17:24:40 CST 2003


Hello List And Hugh

I have a problem, I am trying to set up our session database without much
success.
I am using SessionDatabase SQL.

The current field in my Online table for input and output octects is BIGINT,
(SQL SERVER)
This is working fine except for the fact when we get a user that is download
over 2 gig in any one session.
After this we get an Arithimic overflow error.

This is my query below:
AddQuery insert into RADONLINE (USERNAME, NASIDENTIFIER, NASPORT, \
ACCTSESSIONID, FRAMEDADDRESS, AccInputOctets, AccOutputOctets, \
SERVICETYPE,NASPortDNIS,callerid,AscendKey) values ('%n', '%N', %{NAS-Port},
'%{Acct-Session-Id}', \
'%{Framed-IP-Address}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}', \
'%{Service-Type}','%{Called-Station-Id}','%{Calling-Station-Id}','%{Ascend-S
ession-Svr-Key}')

notice how %{Acct-Input-Octets}and %{Acct-Output-Octets} are enclosed by '',
This is a problem,
I tried converting our fields in the database to numeric so we could handle
the data coming through, but then the sql statement errored as i thought it
would saying error converting varchar to numeric. So i took away the ''
around the two values, and after I did that the values disappeared. Without
the quotes %{Acct-Input-Octets} and %{Acct-Output-Octets} return empty
values.

Even if I try to cast the value as numeric it still comes back as empty.

IN casting numeric I mean this

AddQuery insert into RADONLINE (USERNAME, NASIDENTIFIER, NASPORT, \
ACCTSESSIONID, FRAMEDADDRESS, AccInputOctets, AccOutputOctets, \
SERVICETYPE,NASPortDNIS,callerid,AscendKey) values ('%n', '%N', %{NAS-Port},
'%{Acct-Session-Id}', \
'%{Framed-IP-Address}', cast('%{Acct-Input-Octets}' as numeric),
cast('%{Acct-Output-Octets}' as numeric), \
'%{Service-Type}','%{Called-Station-Id}','%{Calling-Station-Id}','%{Ascend-S
ession-Svr-Key}')

this Still causes the values to return empty.

The values are returning empty becuase I print out the sql string before
execution....

Any help in this matter would be very much appreciated.

Thanks everyone


Kind Regards

Nathan Franklin
TSN Internet
nathan at tsn.cc
MSN: nathanfranko at hotmail.com

'I do not regret the things I have done, but those I have left undone.'

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list