Hi,
I have a DataTable oDT.
oDT is populated from SQL Server with 6 columns including a column "bAAA" of varbinary(200)
I have a function fx(ByVal byteArray As Byte()) as String
I would like to add a calculated column to oDT something like this:
oDT.Columns.Add("sAAA", GetType(String), fx(bAAA))
'bAAA is not declared
oDT.Columns.Add("sAAA", GetType(String), fx("bAAA".ToArray))
'1-dimensional array of char cannot be converted to 1-dimensional array of type byte
oDT.Columns.Add("sAAA", GetType(String), fx("bAAA"))
'value of type string cannot be converted to 1-dimensional array of type byte
oDT.Columns.Add("sAAA", GetType(String), "fx(bAAA)")
'(runtime) undefined function fx
fx() is known to work when bAAA is returned as an output parameter by a sproc.
i.e.
fx(oCmd.Parameters("@bAAA").Value).ToString
does indeed produce the required string.
:( any suggestions?