I needed to retrieve image fields on SQL Server 7.0 with VB6, and I couldn’t find any article about it. So, I assume others have had the same problem. I’ve since found a method for doing it.
You must use Microsoft ADO 2.5 and set it into the following project reference:
dim rst as new adodb.recordsetdim adoConn as new adodb.Connection
You also have to open the connection with the database.
'Open recordset....rst.Open "Select * from
where ", adoConn, adOpenKeyset,adLockOptimistic'THIS FUNCTION SAVES AN IMAGE
INTO AN IMAGE DATATYPE FIELDPrivate Function SaveImage() Dim mStream As New ADODB.Stream With mStream .Type = adTypeBinary .Open .LoadFromFile "NAME>" rst("").
Value = .Read rst.Update End With Set mStream = NothingEnd Function'THIS FUNCTION LOAD IMAGE FROM
IMAGE DATATYPE FIELD AND SAVE IT INTO AFILE.....Private Function LoadImage() Dim mStream As New ADODB.Stream With mStream .Type = adTypeBinary .Open .Write rst("") .SaveToFile "NAME>", adSaveCreateOverWrite End With Set mStream = NothingEnd Function
Aside from this method, you can use a picture control to store an image,put a picture control into a form, and call it PictureTemp.
PictureTemp.DataField = "Immagine"
'Set DataField....Set PictureTemp.DataSource = rst
'Set DataSource
You can use the PictureTemp.Picture property to get your image.
Private Function LoadImage() Dim mStream As New ADODB.Stream With mStream .Type = adTypeBinary .Open PictureTemp.DataField = "Immagine"
'Set DataField.... Set PictureTemp.DataSource = rst
'Set DataSource Set MSFGRID.CellPicture = PictureTemp.Picture
'Show image into a cell ofMicrosoft FlexGrid End With Set mStream = NothingEndFunction
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.
Related Posts
About Our Editorial Process
At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.
See our full editorial policy.
Joint Investment Vehicle Hits Hard-Cap
Sumit Kumar
May 5, 2026
4:58 PM
LG Refines Ultra-Thin Wallpaper OLED TV
Steve Gickling
May 5, 2026
4:48 PM
Artemis II Crew Marks Historic Firsts
Steve Gickling
May 5, 2026
2:42 PM
Three Problems Slowing Down Every DBA Managing Multiple Database Platforms
Amelia Blackwood
May 5, 2026
2:29 PM
Microsoft, OpenAI End Exclusive Partnership
Rashan Dixon
May 5, 2026
2:11 PM
Youth Scheme Targets Misogyny Through Education
Sumit Kumar
May 5, 2026
1:11 PM
Markets Brace For Earnings And Jobs
Rashan Dixon
May 5, 2026
12:28 PM
Quantum Threat Spurs Urgent Crypto Shift
Kirstie Sands
May 5, 2026
11:41 AM
Open Models Are Winning The Real AI Battle
Joe Rothwell
May 5, 2026
8:09 AM
New AI Method Adds Human-Readable Explanations
Rashan Dixon
May 4, 2026
3:28 PM
New Method Speeds Reasoning LLM Training
Rashan Dixon
May 4, 2026
3:23 PM
Bob Targets Safer Agent Workflows
Kirstie Sands
May 4, 2026
3:22 PM
MIT Postdoc Program Draws Applicants
Steve Gickling
May 4, 2026
1:59 PM
Pressure on Kimmel and ABC Alleged
Sumit Kumar
May 4, 2026
1:20 PM
The Million-Dollar Value of the Right Domain Name
Rashan Dixon
May 4, 2026
12:28 PM
Altman Testimony Looms As Tech Watches
Sumit Kumar
May 4, 2026
12:08 PM
Rijksmuseum Show Traces Photo Manipulation
Steve Gickling
May 4, 2026
8:56 AM
Investors Shift From OpenAI to Anthropic
Sumit Kumar
May 1, 2026
5:04 PM
Google Confronts Pentagon AI Debate
Steve Gickling
May 1, 2026
5:04 PM
Otter Launches Windows Note-Taking App
Sumit Kumar
May 1, 2026
4:19 PM
Apple Flags Decline In Safari Searches
Kirstie Sands
May 1, 2026
2:18 PM
AI’s Next Act Reshapes Hollywood Production
Deanna Ritchie
May 1, 2026
11:44 AM
Netomi Secures $110 Million Series C
Rashan Dixon
May 1, 2026
9:49 AM
Attempted Assassination Charge After WHCA Gunfire
Sumit Kumar
April 30, 2026
4:54 PM
Binance Co-Founder Sees World Cup Betting Lift
Sumit Kumar
April 30, 2026
3:44 PM























