asp的数据库查询出现问题,弄了一天也弄不出来 在线
小弟初学者
源代码:
<% Option Explicit %>
<%Response.Buffer=True%>
<html>
<head>
<title> 查询 </title>
</head>
<body>
<%
If session( "username ")= " " Then
response.redirect "list1.asp "
End if
%>
<h2 align= "center "> 查询 </h2>
<center>
<form method= "post " action= " ">
<table border= "0 " width= "90% " bgcolor= "#E6E6E6 ">
<tr>
<td> 号码关键字: </td> <td> <input type= "text " name= "号码 " size= "20 " > ** </td>
</tr> <tr>
<td> 用户关键字: </td> <td> <input type= "text " name= "用户 " size= "20 " > ** </td>
</tr> <tr>
<td> 地址关键字: </td> <td> <input type= "text " name= "地址 " size= "20 " > ** </td>
</tr> <tr>
<td> </td> <td> <input type= "submit " value= " 确 定 "> </td>
</tr>
</table>
</form>
<%
Dim db
Set db=Server.CreateObject( "ADODB.Connection ")
db.Open "Database=TOLLDB_3;uid=sa; pwd=12; Driver={SQL SERVER};Server=localhost "
'如果没有输入姓名关键字就不执行下列语句
If Trim(Request( "号码 ")) <> " " or Trim(Request( "用户 ")) <> " " or Tr