⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admbooklist.asp

📁 tushuguanlixitong 图书借阅系统 用ASP实现的 能实现简单的功能
💻 ASP
字号:
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
</head>

<body bgcolor=#FF6600>

<table border="1" width="100%"  id="table1">
    
	<tr>
		<td colspan="6">
		<p align="center">图书馆书籍显示列表 </td>

	</tr>

	

	<tr>
		<td>书号</td>
		<td>书名</td>
		<td>总书数目</td>
		<td>库存数目</td>
		<td>借出数目</td>
		<td>说明</td>

	</tr>

<%
dim bookno
dim bookname
dim nownumber
dim sumnumber
dim lendnumber
dim describe

dim strConn
dim strSQL
dim objrst

strConn = "DSN=dblib;uid=;pwd=;database=db"
strSQL = "select * from Tbook"

set objrst = GetADORecordset (strConn,strSQL)
      if objrst.bof and objrst.eof then
     response.write "<html> <head>"
     response.write "<title>显示书目</title>"
     response.write "</head><body>"
     response.write "<br><br><center><font size=5 color=navy><b>对不起,暂时没有可用的书!<br>"
     response.write "</body></html>"
     
     else
     
          objrst.movefirst
		  while not objrst.eof
		  bookno = objrst.fields("bookno")
		  bookname = objrst.fields("bookname")
		  sumnumber = objrst.fields("sumnumber")
		  nownumber = objrst.fields("nownumber")
		  lendnumber = objrst.fields("lendnumber")
		  describe = objrst.fields("describe")
		  
		  %>
    <tr>
		<td><%=bookno%></td>
		<td><%=bookname%></td>
		<td><%=sumnumber%></td>
		<td><%=nownumber%></td>
		<td><%=lendnumber%></td>
		<td><%=describe%></td>
		
	</tr>
		 <%objrst.movenext
		    wend
            End if		   
 %>   
			

<%
'======================================================================
'  GetADORecordset -- Gets an ADO recordset given a connectionstring,
'  sql query string.
'
'==============================
Function GetADORecordset(strConn, strSQL)
	On Error Resume Next
	 
	Dim objConnection
	Dim objRecordset
	
	Err.Clear 
	
	' Setup an ADO connection to the database:
	Set objConnection = Server.CreateObject("ADODB.Connection")
    Set objRecordset = Server.CreateObject("ADODB.Recordset")
    
    objConnection.ConnectionString = strConn
    objConnection.Open
    Set objRecordset.ActiveConnection = objConnection
    objRecordset.Source = strSQL
    objRecordset.CursorLocation = 3
    objRecordset.Open
	
	If Err Then
		Set GetADORecordset = Nothing
		If Not HaveError() Then
			SetError "GetADORecordset", Err.number, Err.Description
		End If
	Else
		Set GetADORecordset = objRecordset
	End If 
End Function

%>

</table>

<form action=delqueren.asp method=post>
<table border="1" width="100%">
	<tr>
		<td colspan="2">
		<p align="center"><b><font size="4">书籍删除</font></b></td>
	</tr>
	<tr>
		<td width="45%" align="right">书号</td>
		<td width="54%"><input type="text" name="bookno" size="20"> </td>
	</tr>
	<tr>
		<td width="45%" align="right">书名</td>
		<td width="54%"><input type="text" name="bookname" size="20"> </td>
	</tr>
	<tr>
		<td width="45%" align="right" colspan="2"><p align="center"><input type="submit" value="提交" name="B1"> </td>
		

	</tr>

</table>
</form>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -