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

on Jul 02, 2018 02:14 AM

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)


Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Jul 02, 2018 03:00 AM

I dont know how what is the sql query for image

on Jul 02, 2018 03:06 AM

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