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

display GIF / JPG from Access to asp (URGENT :-( )

Status
Not open for further replies.

2IT

Programmer
May 6, 2002
2
TN
Hi All,
I have created my database with access , and wrote this script, but when I publish my asp page, I receive this message
Objet Response error 'ASP 0156 : 80004005'
/Default.asp, line 24


here's my script (SOMEONE CAN HELP ME )

<HTML>
<HEAD>
<TITLE>show pictures </TITLE>
</HEAD>
<BODY>
<%@ LANGUAGE=&quot;VBSCRIPT&quot;%>
<p>
<BR><BR>
<P ALIGN=&quot;CENTER&quot;><STRONG><FONT SIZE=&quot;5&quot;>DATA SHOW</FONT></STRONG></P>
<BR><BR>
<%
' Open database
Set BaseLink = Server.CreateObject(&quot;ADODB.Connection&quot;)
BaseLink.Open &quot;Visiteurs&quot;, &quot;&quot;, &quot;&quot;

' SQL
varSQL = &quot;SELECT * FROM Pays WHERE idprod = 1 &quot;

' BASESET
Set BaseSet = Server.CreateObject(&quot;ADODB.Recordset&quot;)
BaseSet.Open varSQL, BaseLink
' GIF
Response.ContentType = &quot;image/gif&quot;
Do While Not BaseSet.EOF
%>
<P align=&quot;center&quot;><STRONG><% Response.Binary Write BaseSet(&quot;Photo&quot;)%></STRONG></P>
<%
BaseSet.MoveNext
Loop
' close DB
BaseSet.Close
BaseLink.Close
Set BaseSet = Nothing
Set BaseLink = Nothing
%>
</BODY>
</HTML>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top