Home All Groups Group Topic Archive Search About

ADO.NET 2.0 and Insert Parameters of Byte()

Author
12 Jan 2006 5:09 PM
Brian Mitchell
Hello,



I am using the new SqlDataSource object with VS 2005 and I guess I am using
it incorrectly. I need to know how to set the value of an InsertParameter
equal to a Byte() array I have.



Originally I had the parameters listed in the InsertQuery (from the
designer) and through code I was trying something to the effect of
dsUsers.InsertParameters("Rights").DefaultValue = ms (ms is a memory
stream). However, the DefaultValue property only accepts a string and I
couldn't use it.



Then I tried adding the parameter manually using the .add method but
ultimately ended up in the same situation.



Can someone post a tiny snippet of code that shows how to set the values of
the parameter to data types other than strings?



Thanks!!

AddThis Social Bookmark Button