I'm trying write a SQLCLR that returns FileInfo.Attrib utes property to SQL
Server in a record set and I am getting the following error.
cannot convert from 'System.IO.File Attributes' to
'System.Data.Sq lTypes.SqlInt32 '
How can I convert the Attributes to display an integer value. Clearly the
code below doesn't work. What do I need to do to make it work?
FileInfo f = new FileInfo(FileIn fo);
SqlMetaData Attributes;
Attributes = new SqlMetaData("At tributes", SqlDbType.Int);
record = new SqlDataRecord(n ew SqlMetaData[] { Attributes });
record.SetSqlIn t32(0,f.Attribu tes);