Asp.Net: private function in SQL SELECT statement
Posted on 2004-09-23
in my Asp.Net (VB.Net) application
I'm using an SQL select statement like
strSQL = "select * from table where (field = '" & strCompare & "'")
but I need an SQL statement like
strSQL = "select * from table where (MyFunction(field) = '" & strCompare & "'")
Private Function MyFunction(strField as String) as String
myfunction = "xxx"
I cannot use a function for strCompare.
I couldn't find a way to have for this a proper syntax.
If anyone knows a solution please supply appropriate [snippet] information.
The database behind is MS Access.
Thank you very much!