CodePudding user response:
Method is the same,A blob field
CodePudding user response:
Of course, the database has nothing to do with the interfaceCodePudding user response:
Of course, to give you an example:Showpic. Asp
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
<% % @ LANGUAGE="VBSCRIPT" & gt;
<%
The Response. The Expires=0
The Response. The Buffer=TRUE
The Response. The Clear
The Response. The ContentType="image/GIF"
Set the conn=server. CreateObject (" ADODB. Connection ")
Conn. Open "DSN=myDSN; UID=sa; The PWD=; The DATABASE=pubs "
Set the RS=conn. Execute (" select photo from people where id='3201' ")
The response. BinaryWrite rs (" photo ")
The response. The END
%>
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Then the above code can be directly inserted into the IMAGE tag, you can extract data from the database to HTML or ASP page display function:
Showpic. HTML
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
<body>