On 21/06/2019 13:30, Dom Latter wrote:
Executing select query: SELECT 10000 rlm_sql_unixodbc: 22003 [Microsoft][ODBC Driver 17 for SQL Server]Numeric value out of range
To recap - using rlm_sql_unixodbc to connect to SQL Server had the weird bug that any number more than four digits long was "out of range". Now I have used rlm_sql_unixodbc to connect to freetds and thence to SQL Server. It works (having had to rename my radius database to "Sample" because that is what it was looking for despite me not having "Sample" anywhere in the configuration) but this time numbers more than four digits long are simply truncated: (24) EXPAND %{sql:SELECT 123456 } (24) --> 1234 (24) EXPAND %{sql:SELECT '123456' } (24) --> 123456 (24) EXPAND %{sql:SELECT CAST(123456 as varchar) } (24) --> 123456 All very strange.