O'Reilly logo

Essential ADO.NET by Bob Beauchemin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

B.7. Functions

The following functions are also supported:

 CONVERT
Description Converts given expression to a specified .NET Framework Type.
Syntax Convert(expression, type)
Arguments expression — The expression to convert. type — The .NET Framework type to which the value will be converted.

Example: myDataColumn.Expression=“Convert(total, 'System.Int32')”

All conversions are valid with the following exceptions: Boolean can be coerced to and from Byte, SByte, Int16, Int32, Int64, UInt16, UInt32, UInt64, String, and itself only. Char can be coerced to and from Int32, UInt32, String, and itself only. DateTime can be coerced to and from String and itself only. TimeSpan can be coerced to and from String and itself only.

 LEN
Description Gets the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required