(RADIATOR) 2 SQL sentences in AddQuery

Hugh Irvine hugh at open.com.au
Thu Jul 5 03:38:30 CDT 2001


Hello Jon -

As you have discovered, you cannot specify multiple queries in this way.

You have two options, either use a stored procedure in your database 
(if the database supports stored procedures), or you can use an 
AuthBy SQL clause with multiple AcctSQLQueries in conjunction with 
the session database to achieve the same result.

regards

Hugh


At 18:15 +0200 01/7/4, Jon Omagojeaskoa wrote:
>How can I concat 2 SQL sentences in <SessionDatabase SQL>'s "AddQuery" ?
>
>
>I've tried with ";" :
>
>
>AddQuery        insert into RADONLINE \
>                         (USERNAME, NASIDENTIFIER, NASPORT, 
>ACCTSESSIONID, TIME_STAMP, \
>                         FRAMEDIPADDRESS, NASPORTTYPE, SERVICETYPE) \
>                         values ('%n', '%N', %{NAS-Port}, 
>'%{Acct-Session-Id}', %{Timestamp}, \
>                         '%{Framed-IP-Address}', '%{NAS-Port-Type}', 
>'%{Service-Type}')  ; \
>                   update RADPOOL set STATE=2 WHERE 
>YIADDR='%{Framed-IP-Address}'
>
>But :
>
>Wed Jul  4 20:09:32 2001: DEBUG: do query is: insert into RADONLINE 
>(USERNAME, NASIDENTIFIER, NASPORT, ACCTSESSIONID, TIME_STAMP, 
>FRAMEDIPADDRESS, NASPORTTYPE, SERVICETYPE) values ('omago', 
>'203.63.154.1', 1234, '00001234', 994270172, '212.81.164.11', 
>'Async', 'Framed-User'); update RADPOOL set STATE=2 WHERE 
>YIADDR='212.81.164.11'
>
>Wed Jul  4 20:09:32 2001: ERR: do failed for 'insert into RADONLINE 
>(USERNAME, NASIDENTIFIER, NASPORT, ACCTSESSIONID, TIME_STAMP, 
>FRAMEDIPADDRESS, NASPORTTYPE, SERVICETYPE) values ('omago', 
>'203.63.154.1', 1234, '00001234', 994270172, '212.81.164.11', 
>'Async', 'Framed-User'); update RADPOOL set STATE=2 WHERE 
>YIADDR='212.81.164.11'': You have an error in your SQL syntax near 
>'; update RADPOOL set STATE=2 WHERE YIADDR='212.81.164.11'' at line 1
>
>
>Thanks.
>
>
>-------------------------------------------------------------------
>Jon Mikel Omagojeaskoa Insunza
>SARENET
><omago at sarenet.es>
>+34 94 4209470
>-------------------------------------------------------------------
>
>===
>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.

-- 

NB: I am travelling this week, so there may be delays in our correspondence.

Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.
===
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