Richard Korts
asked on
Using SQL to insert image into MS Access
How do I write the SQL to insert an image into an OLE object in Access?
This is on a web server.
Let's assume the image is in "tempwork/abc.jpg".
Is it like this:
x = "tempwork/abc.jpg".
INSERT into table (oleimage) values('" & x & "')"
This is on a web server.
Let's assume the image is in "tempwork/abc.jpg".
Is it like this:
x = "tempwork/abc.jpg".
INSERT into table (oleimage) values('" & x & "')"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It is not possible to use just SQL to insert the image. You will need to use VBA, or other programming language like Visual Studio / Delphi to do this.
ASKER
To all:
I am using VBscript on a web server. Can it be done using that?
Thanks
I am using VBscript on a web server. Can it be done using that?
Thanks
The link provided in my previous post (http:a24308468) has VBA code which you should be able to adapt to VBScript...
I've inserted images using access, If I remember right I had to copy then paste the image for each record to be able to save the image, but size of the database will grow quite fast and after a few hundred images you will see performance issues. The best practice would be to simply save the image in a predefined folder then use a text field and save the path to the image and then using VBA or VB script to display the image where the path is located.