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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display image pointed to in database 1

Status
Not open for further replies.

tomhughes

Vendor
Joined
Aug 8, 2001
Messages
233
Location
US
Does anyone know how to display an image in a frame in a web page that is accessed through a Recordset in Microsoft Access. I tried to use the Hyperlink property in the cell in Access, but the image it was pointing to did not show in the web page.
 
I have one for each picture. They are named in sequence, as are my pictures, since I am working toward inserting a variable name in their sequence number. For example, my pictures are named Pic1.gif, Pic2.gif, etc.. My text files are named Text1.txt, Text2.txt, etc.. This way all I have to do is increment a variable with a button press, and I have a new sequence of text and pictures.
 
schase - Atually, all I need to do is just increment my recordset name, instead of the files in the fields themselves. Since I have my data base in ACCESS set to autoincrement, then all I need to do is increment my Recordset number.
 
ok,

Try this - now I have not attempted this, but I am combining two things into one - we can always troubleshoot together.

I am going to assume you named the text file field something like "Imagetext" and in the imagetext field in the database put the title like 12345.txt

get to the source code for the cell.

Inbetween the TD's

Put this

<!--#include file=&quot;=&quot;<%=(Recordset1.Fields.Item(&quot;imagetext&quot;).Value)%>&quot; -->

UD4 will most likely give you all kind of yellow Error marks - Do NOT erase anything, leave them - it comes together okay.



 
schase - IT gave me this error

Active Server Pages error 'ASP 0126'

Include file not found

/onlinelearning/Tom_Test/Jeff/Graphics.asp, line 28

The include file '=' was not found.


 
whoops my error
remove one =&quot;
 
Yes, I am loking for the correct text. I have another include file since this is an .asp file, and it has the folder name in it also--- so I am putting the folder name in this string. Another thing, I believe this is VB Script, not java, so I am attempting changes to reflect VB script.
 
schase - This code :

<!--#include file=&quot;Text/<%=(Recordset1.Fields.Item(&quot;Frame1&quot;).Value)%>&quot; -->

Gives this error:

Active Server Pages error 'ASP 0126'

Include file not found

/onlinelearning/Tom_Test/Jeff/Graphics.asp, line 30

The include file 'Text/<%=(Recordset1.Fields.Item(' was not found.

Any suggestions ????
 
Two ideas

First, do you have the exact file name in that folder - check cap's also.

Second, if you do, then name the text file as an include file of .inc so 12345.txt would become 12345.inc

 
schase - I renamed the file to Text1.inc, and changed the name in the data base field to Text1.inc, but no deal Lucille. It still can't find it.

Active Server Pages error 'ASP 0126'

Include file not found

/onlinelearning/Tom_Test/Jeff/Graphics.asp, line 50

The include file 'Text/<%=(Recordset1.Fields.Item(' was not found.
 
there must be a name error somewhere

either in the relation, the inc file itself, directory name

check caps, spelling, path - if it is backing up a directory or going down a directory.
 
SCHASE - Again, I want to thank you for helping me.
 
my pleasure, did you find the error?
 
No - I never found out why I could not just use the name of the file in the Field, so I have just put the text in the field.
 
That is strange, I will have to play around with it later on. Well, you can easily do the ASP Upload for the picture files - and have them type in whatever on the insert form.

Works pretty slick actually.
 
I don't understand either why it does not work, but at least I can just type the text into the Field.
 
Yea - that will cut down on alot.

The pure ASP Upload is a pretty nifty behavior. I use it for my members to upload .zip files of items they created - they can type in the filename, Title, description, and upload the zip file, i've got it then immediately available for download.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top