|
You didn't include the SQL insert statement you're using, so it's hard to determine exactly why it's not working. I recommend you put your database code for this file in the code-behind page rather than using a SqlDataSource web control.
There are two different datatype you can use in the database to store images. You can use varBinary(MAX) as you've used, or you can use image. The most imporant part is that you send the file to the database as a byte array. This has an example for SQL 2000, but it will work just as well in SQL 2005. http://www.codeproject.com/KB/web-image/PicManager.aspx
|