Uploading a file to a database using System.Data.OleDb
Details Related Types
Site:  DotNetJunkies
Original URL:  http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=127
Summary:
In this article we will demonstrate how to upload a file to a database using the OleDb .NET Data Provider. Using the Sql .NET Data Provider is very similar with one exception and that is how to insert the Byte array into the database using OleDb. The following code example demonstrates how to do this. The first bit of code is SQL that should be used to create a new table in the Northwind database named images. After that is the web form code, and that is followed by the code behind for the web form.
System.Byte
System.Data.DbType
System.Data.OleDb.OleDbCommand
System.Data.OleDb.OleDbConnection
System.EventArgs
System.Exception
System.Int32
System.IO.Stream
System.Object
System.String
System.Web.HttpPostedFile
System.Web.UI.HtmlControls.HtmlInputFile
System.Web.UI.Page
System.Web.UI.WebControls.Label
System.Web.UI.WebControls.TextBox
System.Windows.Forms.TextBox
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com