No component graphics and text mix upload, MSSQL & Access

Source: Internet
Author: User
Tags mssql
access| Upload | No components The following code has no specifications, and some features have not been completed, there is the master can modify it, packaged into a class is more for the benefit of the public, or later I will do the time. There are any mistakes or suggestions please make sure to send me e-mail:sobina@21cn.com, thank you.
Okay, less to say more, this example tests through in W2kserver,iis5,sql SERVER7.
If you do not understand can go to the essence of the "image" or "picture" keyword to find the answer, or write to me.
Example a total of three files: upload.htm (Upload interface)
process.asp (processing program)
Showimg.asp (show image)
Database: Create a new table named Imgtest in the pubs database
Field Name Type length
-----------------------------------------------------
ID Int (autonumber)
IMG Iamge (Access is OLE)
Imginfo NCHAR 50

The following are the code for three files:

Upload.htm
---------------------------------------------------------------------
<title>untitled document</title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<style type= "Text/css" >
<!--
td {FONT-SIZE:9PT}
A {color: #000000; Text-decoration:none}
a:hover {Text-decoration:underline}
. tx {height:16px; width:30px; border-color:black black #000000; border-top-width:0px;

border-right-width:0px; border-bottom-width:1px; border-left-width:0px; font-size:9pt;

Background-color: #eeeeee; Color: #0000FF}
. bt {font-size:9pt; border-top-width:0px; border-right-width:0px; border-bottom-width:0px;

border-left-width:0px; height:16px; width:80px; Background-color: #eeeeee; Cursor:hand}
. tx1 {height:20px; width:30px; font-size:9pt; border:1px solid; Border-color:black Black

#000000; Color: #0000FF}
-->
</style>

<body bgcolor= "#FFFFFF" text= "#000000" >
<form name= "Form1" method= "Post" action= "process.asp" enctype= "Multipart/form-data" >
<table width= "71%" border= "1" cellspacing= "0" cellpadding= "5" align= "center"

bordercolordark= "#CCCCCC" bordercolorlight= "#000000" >
<tr bgcolor= "#CCCCCC" >
&LT;TD height= "align=" "left" valign= "Middle" bgcolor= "#CCCCCC" > Sobina
Graphics and text upload interface </td>
</tr>
<tr align= "left" valign= "Middle" bgcolor= "#eeeeee" >
&LT;TD bgcolor= "#eeeeee" > <br>
</td>
</tr>
&LT;TR align= "center" valign= "Middle" >
&LT;TD align= "left" id= "Upid" height= "122" >
<p> Image path:
<input type= "file" Name= "img" style= "width:400" class= "tx1" "value=" ">
</p>
<p> image description:
<input type= "text" name= "Imginfo" >
</p>
</td>
</tr>
&LT;TR align= "center" valign= "Middle" bgcolor= "#eeeeee" >
&LT;TD bgcolor= "#eeeeee"



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.