473,396 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

retrieving an image from an access database

2
For reasons best known to our IT department, my department is not allowed to use SQL. Instead we have to use Access. No problem there, except we have a need to store images into a database for security reasons. I have now spent over a day and a half trying to crack this. I know it is something to do with stripping the headers from the image held in the database. I did come across an example in c# on this site, but couldn’t convert that code into vb.net.

My current code behind page looks like this and produces gibberish

Option Strict Off
Imports System
Imports System.Web.UI

Imports System.Data
Imports System.Data.OleDb
Imports System.Configuration


Public Class PublicGuidelineList: Inherits Page

public strImage as string
Public strConnString as String = ConfigurationSettings.AppSettings("ConnectionStrin g")
public objConn as New OleDbConnection(strConnString)

Sub Page_Load(Src As Object, E As EventArgs)
If Not Page.IsPostBack

BindData()
End If
End sub

sub bindData()



strImage = "SELECT * FROM table1 "
objConn.open

' Create & execute OleDbCommand query to return records
dim ocd as OleDBCommand = New oleDbCommand(strImage, objConn)
dim myDataReader as oleDBdatareader

myDataReader=ocd.executereader()


myDataReader.read()

Response.binaryWrite(myDataReader.Item("signature" ))

objConn.close
end sub

end class

If anyone has a snippet, I would be gratefule.
Jul 30 '07 #1
0 1015

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jari Dolberg | last post by:
Hi, I am looking for a solutions for the following problem, I need to access at database from within a website, from where I can retrive a specific document in the database and mailing it to...
1
by: Roman Kagan | last post by:
Hi everyone, I am successful in retrieving the image from the table (.TIF), however, the retrieved file does not work. It looks like an image file - extension, size and all, but the image is not...
0
by: alienize | last post by:
Does anyone know how i would retrieve stored images from my access database(I've stored them as OLE objects) and then bind the retrieved image to an Image Control? Also, How would i retrieve an...
6
by: Dean Slindee | last post by:
Does anybody have an actual example of retrieving an Image data type column from a SQL Server table using a dataset (not a datareader)? I would like to see the statements that would move the...
3
by: Dennis | last post by:
How can I save then retrieve an image from an access Database using VB.Net? -- Dennis in Houston
0
by: islay | last post by:
I'm trying to retrieve an image from an Access 97 database and printing it on a report. I'm using a 'System.Data.OleDb.OleDbConnection()' object to connect to the database, a...
0
by: miffer | last post by:
Hi everyone For reasons best known to our IT department, my department is not allowed to use SQL. Instead we have to use Access. No problem there, except we have a need to store images into a...
1
by: san123456789 | last post by:
Hi, Im using a MS SQL server to store images... Im creating a windows form application using C#. I need to store and retrieve images from the database. This is my code to store images: ...
2
by: shivapadma | last post by:
i have inserted the image into database using the following code String driverName = "com.mysql.jdbc.Driver"; String url = "jdbc:mysql://localhost:3306/"; String dbName =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.