in order to upload image to database,i put a fileUpload control in the InsertItemTempl ate of the formView,the code as follows:
and the FormView is bind to a sqlDataSource,p art of code in sqlDataSource is
,but when i click the "insert" button ,there is a error show that parameter @keyImage beyond the limite of sql_variant DataType.the dataType of keyImage field in the table is Image.what's wrong ?I don't know.
Code:
<asp:FileUpload ID="FileUploadKeyImage" runat="server" FileBytes='<%# Bind("keyImage") %>' />
Code:
<asp:Parameter Name="keyImage" Type="object" />
Comment