Fail to user "Math.Abs" inside SQL statement
I want to get the absolute vale of a field (NumberField) inside my table which are both negative and positve.
My SQL State is:
===============
strSQL="SELECT top 1 Math.Abs(NumberField) as MaxID" & _
"FROM MyTable Order by MaxID DESC;"
Dim Adapter As New OleDbDataAdapter(strSQL,Conn)
Dim Dset as new Dataset
Adapter.Fill(Dset,"MyData")
......
===============
I always got error:
================
"System.Data.OleDb.OleDbException: Undefined function 'Math.Abs' in expression."
================
Anyone got any clue?
Thanks,
|