Upload image in pervasive database table

I need to upload images in Pervasive.SQL 9.5 database seating on server.

I created a new filed Image longvarbinary type in a table tblProduct  in pervasive database..
Now I need to add images that I have stored in my MSAccess table tblItems.
In this table I have a field Pictures OLE object type  where I stored jpg images.
Or  it could be from folder on my PC does not matter.

Is it possible to do this from Access 2003 and how?
If somebody has example or script that I can use to do this.

I dont know is this possible to be done directly from Pervasive.SQL database?
Who is Participating?
mirtheilConnect With a Mentor Commented:
Best suggestion I can give would be to write an application that reads the image from disk into a BinaryStream type variable (what you use depends on the programming language) and then issue an INSERT statement to insert the image into the PSQL database.  
Here's a link to some code:
It uses MS SQL Server but can be adapted to PSQL easily.
There's not a script that will do this automatically. I don't know that Access can do this.  
You might be able to link the PSQL table in Access then insert the data to PSQL.  
Another way would be to write an application that reads the images into a binary stream variable, then use a parameterized query to insert the record.  
Personally, I don't store images in the database.  I prefer to store a link to the physical file.  That way, I don't have the overhead of reading and writing the image data twice (once to/from disk for display and once to/from the database).  
TarasAuthor Commented:
I need to display these pictures on Cristal Report8 that does not support image path  for display of images on report. This capability is introduced with CR11 as I understand
My client has application that is running on  pervasiveSQL9.5 database and using Crystal report 8. Now he wants to put pictures of his product on report. I dont have access to application code just to report and database.
That is reason that I am looking in option to upload images in table and use image control on crystal report to show images for particular record-product.

TarasAuthor Commented:
thanks a lot.
It is good approach I will look in it.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.