Upload image to MS Access database (.mdb) in ASP.Net

Last Reply 18 days ago By dharmendr

Posted 18 days ago

how to upload image to ms access 

Partial Class package1
Inherits System.Web.UI.Page
Dim con As New OleDbConnection

Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim myConn As OleDbConnection
Dim cmd As OleDbCommand
Dim sqlString, PackageID, PackageName, PackageDescription, PackageImage As String
Dim FileUpload1

PackageImage = FileUpload1
PackageID = TextBox1.Text
PackageName = TextBox2.Text
PackageDescription = TextBox3.Text

myConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; data source=" & Server.MapPath("Tour.mdb"))


sqlString = "INSERT INTO Package (PackageID, PackageName, PackageDescription, PackageImage) VALUES ('" + TextBox1.Text + "', '" + TextBox2.Text + "', '" + TextBox3.Text + "');"
cmd = New OleDbCommand(sqlString, myConn)


Posted 18 days ago

I dont know how what is the sql query for image

Posted 18 days ago

Please refer the answered reply link provided in the link and read the solution provided.