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

只能输入一次到数据库,为什么啊!!!!!!!!!
写了一个asp程序,但是为什么执行一次程序只能写入一组数据啊?
再写就写不了了。一定要重新再开ie才能再写入,并且重开是不能有一个打开的ie页面,一定要完全重开。

哪位大侠告诉我是什么原因啊   ?
帮我改一改吧,谢谢了。

源代码如下:

<!--#include   file= "conn/conn.asp "   -->
<%
if   Request.Form( "bookname ") <> " "   and   session( "bookname ")= " "   then
session( "barcode ")=request.Form( "barcode ")
session( "bookname ")=Request.Form( "bookname ")
bookconcern=request.Form( "bookconcern ")
shortname=Request.Form( "shortname ")
author=Request.Form( "author ")
price=Request.Form( "price ")
kind=Request.Form( "kind ")
cover=Request.Form( "cover ")
memo=Request.Form( "memo ")
Ins_sql   =   "Insert   into   tb_bookinfo(bookname,shortname,barcode,bookconcern,author,price,kind,cover,memo)     values( ' "&session( "bookname ")& " ', ' "&shortname& " ', ' "&session( "barcode ")&_
" ', ' "&bookconcern& " ', ' "&author& " ', ' "&price&_
" ', ' "&kind& " ', ' "&cover& " ', ' "&memo& " ') "
response.write   Ins_sql
conn.execute(Ins_sql)
response.redirect( "register_book.asp ")
end   if

%>
<%
'Set   rs_Max   =   Server.CreateObject( "ADODB.Recordset ")
'sql_max= "SELECT   MAX(bookname)   AS   Maxbook     FROM   tb_bookinfo "
'rs_max=conn.execute(sql_max)
%>
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<title> 新书入库 </title>
<LINK   rel= "stylesheet "   href= "CSS/STYLE.CSS "   type= "text/css ">
</head>

<body   leftmargin= "0 "   topmargin= "0 ">
<table   width= "690 "   height= "54 "   border= "0 "   align= "center "   cellpadding= "-1 "   cellspacing= "-1 ">
    <tr>
        <td   height= "54 "   style= "filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr= '#FFCC00 ',   endColorStr= '#FFFFFF ',   gradientType= '1 ') "> <div   align= "center "   style= "font-size:12px ">
            <p> <br>
                新书入库 <br>
                <br>
                </p>
        </div> </td>
    </tr>
</table>
<table   width= "660 "   height= "278 "   border= "0 "   align= "center "   cellpadding= "-1 "   cellspacing= "-1 ">
    <tr>
        <td   height= "278 "   valign= "top "   background= "images/buycar_b