Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Images on a Form 2

Status
Not open for further replies.

mikeyb540

Programmer
Jul 7, 2003
173
US
I have a link table to MS SQL Server that has images.

Is there a way to view the Image(SQL server database Blob) on a MS-Access Form?

If yes, is there control in Access 2000?

Txs in advance.
Mike
 
You may be able to use the code found at which uses the intel jpeg library.
There's an example using Access, I've not got SQL server here, but it looks like it may work.

Have fun!!


B

----------------------------------------------
Ben O'Hara "Where are all the stupid people from...
...And how'd they get so dumb?"
rockband.gif
NoFX-The Decline
----------------------------------------------
 
Here's something you can try. Attach the SQL table to the access database. Set the table as the record source for your form. Create an OLEDB object frame using the toolbox. Set its record source to the SQL BLOB field. I don't have any SQL blobs available to test it, but it bet it will work.

This works too, but takes up a lot of disk space. If you look at this article, it will show you how to write the BLOB out to a file.
On your form, use the toolbox to create an image frame whose source is the file created.

 
Thanks guys.

Oharab, the link you gave me has a dll. That seems to be my solution. for some reason i cant register it but I will work it out.

vbajock, your solution takes the blob exports it then the Access form views the file. This seems a bit of an overkill but also a solution.

Thanks again.
Mike
 
Actually, I gave you two methods. Did you try the first one?
 
vbajock, I wish it was that easy.

I setup a OLEBound1 object and ControlSource=BLOB_IMAGE
When viewing the form it is Blank.

You think I am missing a Property for the Bound Object Frame?

Txs,
Mike
 
Ok, I just got it to work, smooth as silk. I used a bound object frame. I set the control source to the field name of a SQL BLOB server field. The type of the SQL Server field is Image. I plugged a Tom Tommorrow cartoon into it. Works great.

Here are the other properties:

Size mode clip
DisplayType Content
Verb 0
Update Options Automatic
Ole Tpe Allowed Either
 
Hmm... weird man I cant get mine to work

SQL Server 7 table, datatype is Image
I am using the Bound Object Frame's Control Source=BLOB_IMAGE with the default properties and still nothing.

The images are saved as JPEG or BMP.

Any oother ideas?
 
I'm running SQL 2000. The first time I did it I just used the form wizard. Form is set to columner. Picked the image field from the lst box, popped right up. Can you display any text data in other fields in the record?
 
Text data shows up with no problem.
I will try to DTS the data to SQL2000 maybe Access2000 works better that way.

I will let you know if it works.

Txs for all your help and here is another star
 
No go with SQL 2000.

I got the DLL to work from Oharab's link but I cant resize the image.

Also, there is another solution from DBPix 2.0 Control but its $99.
 
Glad you got it almost working.
IIRC correctly you don't need to register the dll, you just need to copy it to %windir%/system32/

It may be worth dropping an email to Stephan Lebans about his sample or posting on comp.databases.access where he "hangs out" and see if he can help with resizing.

Cheers

Ben

----------------------------------------------
Ben O'Hara "Where are all the stupid people from...
...And how'd they get so dumb?"
rockband.gif
NoFX-The Decline
----------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top