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.
Dreamie Alarm Clock Bets On Podcasts
Kirstie Sands
June 10, 2026
4:59 PM
UK Probes eBay’s $1.2B Depop Deal
Rashan Dixon
June 10, 2026
3:01 PM
Tomb Raider Remake Arrives in 2027
Steve Gickling
June 10, 2026
2:06 PM
TechCrunch Disrupt 2026 Early-Bird Deadline Nears
Rashan Dixon
June 10, 2026
1:24 PM
Vector Databases in 2026: Moving Beyond the AI Hype
Rashan Dixon
June 10, 2026
10:11 AM
NASA Declares Mars Maven Spacecraft Lost
Steve Gickling
June 10, 2026
9:22 AM
Resin Shortage Threatens Electronics Prices
Kirstie Sands
June 9, 2026
4:32 PM
Wildfire Smoke Erodes U.S. Smog Gains
Rashan Dixon
June 9, 2026
3:44 PM
Photographer Documents Abandoned Soviet Science
Deanna Ritchie
June 9, 2026
2:00 PM
Notion Executive Surprised By Viral Response
Sumit Kumar
June 9, 2026
1:26 PM
AI’s Next Breakout Is Trust And Local Power
Joe Rothwell
June 9, 2026
12:41 PM
Trump Remarks Stir Uproar Over Intelligence Pick
Sumit Kumar
June 9, 2026
11:38 AM
Why Cyber Risk in Critical Infrastructure—Semiconductors, Financial Services, and Energy and Utilities—Must Be Quantified in Economic Terms
Rashan Dixon
June 9, 2026
11:31 AM
Quiet Robot Mower Wins Neighborhood Fans
Steve Gickling
June 9, 2026
11:27 AM
What Are the Top Cloud-Based Data Room Software Platforms?
Johannah Lopez
June 9, 2026
10:45 AM
The DORA Metrics in 2026: New Benchmarks for High-Performing Teams
Rashan Dixon
June 9, 2026
6:10 AM
California Sues 23andMe Successor Over Data
Deanna Ritchie
June 8, 2026
3:36 PM
Markets Drop After Strong Jobs Report
Steve Gickling
June 8, 2026
3:11 PM
Researcher Calls For Clearer AI Emissions Data
Rashan Dixon
June 8, 2026
2:18 PM
Donny Osmond Revives Teenage Self With Tech
Rashan Dixon
June 8, 2026
12:33 PM
AI Hallucinations in Production Code: Real-World Risks and Mitigations
Rashan Dixon
June 8, 2026
11:00 AM
Final Day For Disrupt 2026 Ticket Deal
Steve Gickling
June 8, 2026
9:59 AM
Ex-IRS Agent Convicted in Double Killing
Sumit Kumar
June 8, 2026
9:41 AM
Poke Wins Approval For Apple Messages
Sumit Kumar
June 8, 2026
9:12 AM
QD‑OLED Should End the Monitor Spec War
Joe Rothwell
June 7, 2026
12:56 PM



















