473,811 Members | 2,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Fetch and Retrieve image in ASP.Net 1.1 using MS Access.

1 New Member
Hello Friends,
Can Anybody guide about how should i code to fetch image and save image in Access database.I have save image by reading byte by byte but cant fetch it appropriately. i have used OLE object data type in access database.

Platform : ASP.Net 1.1(VB.Net)
Database : Ms access

please anybody can help me about this.
Mar 7 '07 #1
1 3349
radcaesar
759 Recognized Expert Contributor
Try This,




Public Sub Page_Load(sende r As Object, e As EventArgs)

dim MyConnection as New OleDbConnection ("Provider=Micr osoft.Jet.OLEDB .4.0;Data Source=C:\ruta\ fotosarq.mdb;")
dim MyCommand as New OleDbCommand("S elect * from Imagenes",MyCon nection)

myConnection.Op en()
Dim myDataReader as OleDbDataReader
myDataReader = myCommand.Execu teReader(Comman dBehavior.Close Connection)


myDataReader.Re ad()
Response.Conten tType = "image/JPEG"
Response.Binary Write(myDataRea der.Item("Foto" ))


myConnection.Cl ose()

End Sub
Mar 7 '07 #2

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

Similar topics

2
1608
by: Joakim Olesen | last post by:
Hi I have a table with a BLOB column which contains bmp images. I'm unsuccessfully trying to fetch one of these images and saving it as a file. The result is a file with a size of 12Kb, but it's not a valid BMP file (I can't view it in an image viewer). The image I try to fetch is quite small though, so the size (12Kb) is sensible. I've pasted my code below (and it doesn't throw any exception): using System;
2
5236
by: Adam | last post by:
I have extensively searched for a solution. Below is my code that is contained in an aspx. When my browser hits this aspx, I just get the standard broken image picture. I know the data is the database is correct because I have seen another employee retrieve it using Crystal Reports. Can someone please tell me what I am doing wrong and offer a suggestion to make this work? (This code does not generate errors, I just can't the image to...
20
929
by: Abhishek | last post by:
can anybody tell how to fetch image from database(access) to the visual basic picture box control. the code i have been using is as below but it gives me invalid paramter error.... Dim connection As New OleDb.OleDbConnection() Dim cmd As New OleDb.OleDbCommand() cmd.CommandText = "select ID,Name,Description,Image from MASTER where ID like '" & Trim(cmbID.Text) & "'" cmd.Connection = connection Dim myReader As OleDb.OleDbDataReader
7
16728
by: asenthil | last post by:
Hai to all, this is senthil... i'm now working in the field of VC++... i want to connect a mysql database... just now tried to retrieve rows from a simple mysql database by using VC++ My database is like this...
17
3553
by: broughcut | last post by:
Is it possible to fetch a specific div from a source html document using XMLHttpRequest, rather than fetching the entire file? I was going to use Ajax on mouseover but keep the normal link intact, so that if the user does not have javascript they can click the link as normal and this would take them to the new page, but if they have javascript (and ActiveX enabled I guess, in the case of IE) it would just fetch the appropriate div into...
0
1757
by: PROGRAMMINGMAESTO | last post by:
How to Fetch and Retrieve image in ASP using MS Access. -------------------------------------------------------------------------------- Hello Friends, Can Anybody guide about how should i code to fetch image and save image in Access database. i have used OLE object data type in access database. Platform : ASP(VB Script) Database : Ms access please anybody can help me about this.
1
1444
by: Mahbubul Alam | last post by:
Hi Any one can tell me how to fetch image data from Access database to VB.NET. Mahbub
3
3912
by: camarun20 | last post by:
Hi , I constructed an MS access query in java to retrieve the rows in random. The code snipet Connection con = DriverManager.getConnection( database ,"",""); Statement s = con.createStatement() strQry = "select top 10 S_No , Rnd(S_No) as exp from Questions order by Rnd(S_No) desc" ; s.execute(strQry) ;
2
1597
by: =?Utf-8?B?SmVmZlAtPg==?= | last post by:
I want to retrieve an image file (TIF) convert it to a bmp file and enable sizing. I know how to do the converting & sizing part, and store any atributes to file location in the webconfig, what I don't know is how to get the image file. The only way that I've got it working was to Impersonate a user login at the other server.
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10647
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10386
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10398
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10133
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9204
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6889
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.