日期:2014-05-17  浏览次数:21023 次

update数据
请看我的代码  

<!--#include   file= "conn.asp "-->
<%
set   conn   =   server.createobject( "adodb.connection ")
set   strconn=server.createobject( "adodb.recordset ")  
strSQL= "select   *   from   CustomerProfile   where   CustomerSerial= "&session( "passport ")& " "
conn.open   strDS1
strconn.open   strSQL,   conn
%>

<head>
<meta   http-equiv= "Content-Language "   content= "zh-cn ">
</head>

<body   topmargin=0   leftmargin=0>
<div   align= "center ">
<table   border= "0 "   width= "90% "   cellspacing= "0 "   cellpadding= "0 "   height=30>
<tr>
<td> </td>
</tr>
</table>
</div>
<form   action=Profileupdate.asp   method=post>
<table   border= "0 "   width= "80% "   cellspacing= "0 "   cellpadding= "0 ">
<tr>
<td   width= "100% "   colspan= "2 ">
<p   style= "line-height:   200%;   margin-left:   150px ">   <b> Customer   Profile </b> </td>
</tr>
<tr>
<td   width= "30% "   align= "right ">
<p   style= "line-height:   200% "> Your   Name: </td>
<td   width= "70% ">
<p   style= "line-height:   200% ">
<input   type= "text "   name= "CustomerName "   value= " <%=strconn( "CustomerName ")%> "     class=input> </td>
</tr>
<tr>
<td   width= "30% "   align= "right ">
<p   style= "line-height:   200% "> Email: </td>
<td   width= "70% ">
<p   style= "line-height:   200% ">
<input   type= "text "   name= "CustomerEmail "   value= " <%=strconn( "CustomerEmail ")%> "     class=input   readonly=yes> </td>
</tr>
<tr>
<td   width= "30% "   align= "right ">
<p   style= "line-height:   200% "> Password: </td>
<td   width= "70% ">
<p   style= "line-height:   200% ">
<input   type= "text "   name= "CustomerPassword "   value= " <%=strconn( "CustomerPassword ")%> "     class=input> </td>
</tr>
<tr>
<td   width= "30% "   align= "right ">
<p   style= "line-height:   200% ">   </td>
<td   width= "70% "> <br>
<p   style= "line-height:   200% ">
<input   type= "submit "   value= "Submit "   name= "submit "   class=submit> </td>
</tr>
</table>
</form>
</body>
<%
conn.close