机动车违章查询

...,Bullcn'Blog - 分享、交流、进步。" /> 车辆查询 SQL 铜川网 - Bullcn'Blog

车辆查询 SQL  铜川网


<form action="carsearch.asp" method="post" target="_blank">
               <tr>
                 <td height="28" >机动车违章查询</td>
               </tr>
               <tr>
                 <td height="19" >
<select name=cl class="hhput">            
                        <option value=小型汽车>小型汽车</option>
                        <option value=大型汽车>大型汽车</option>                                                                    <option <option value=摩托>摩托</option>
                        <option value=轻便摩托>轻便摩托</option>
                        <option value=外籍汽车>外籍汽车</option>
                        <option value=外籍摩托>外籍摩托</option>
                        <option value=农用运输车>农用运输车</option>
                        <option value=拖拉机>拖拉机</option>
                    </select>
                   <select name="menu1">
                     <option selected>陕B</option>
                     <option value="SO">陕O</option>
                     <option value="JO">警O</option>
                   </select>
                   <br>
                   <input type="text" name="code" size="15" maxlength="20">
                   <input type="submit" name="Submit" value="查询"></td>
               </tr>
             </form>


引用内容 引用内容

<%
'SiteMaster系统数据库名称
SYS_DB_name = "tcjj_sys"
'应用数据库名称
APP_DB_name ="tcjj_app"
'数据库登录名称
DB_user = "tcjjw"
'登录密码
DB_pwd  = "tcjjw2005"

dim scon
scon="driver={SQL Server};server=127.0.0.1;uid=" & DB_USER &";pwd="& DB_PWD & ";database="& APP_DB_NAME
%>
<%
function dataExecute(sqlstr,dsnstr)
    '创建数据库操作对象
    set dataExecuteRsTemp=createObject("adodb.recordset")
    
    '执行操作
    dataExecuteRsTemp.open sqlstr,dsnstr,1,3,1
    set dataExecute=dataExecuteRsTemp
    
    '关闭数据库操对象
    set dataExecuteRsTemp=Nothing
    
    '当进行查询操作时,返回记录集
    on error resume next
        err.clear
        dataExecuteCount=dataExecute.recordcount
    if err<>0 then set dataExecute=Nothing

end function
%>

<%
  dim s
  dim code
  dim scode
  s=request.form("menu1")
  code=request.form("code")
  scode= s & "" & code
  dim sql
  sql="select * from L3_car where code='" & scode & "' order by sdate desc"
  'Response.write sql
  dim rs
  set rs=dataExecute(sql,scon)
%>

<html>
<head>
<title>陕西铜川交通信息网-违章查询</title>
<meta http-equiv="Content-Type" content="text/html;">
<style>
body,p,td,th { font-family:Verdana, Arial, Helvetica, sans-serif, 宋体; font-size:9pt; color:#000000 }
body { background-color:#666666;}
.thin {background:#53c7ff}
.thin td{background:#ffffff}
.font{font-weight:bold;}
</style>
</head>
<body bgcolor="#ffffff">
<table border="0" cellpadding="0" cellspacing="0" width="780" align=center>
  <tr>
   <td><img name="wzym_1" src="images/wzym_1.jpg" width="780" height="114" border="0" alt=""></td>
  </tr>
  <tr align=center>
   <td width="780" height="46" bgcolor="#6699CE"><a href="index.asp">返回上一页</a>    <a href="/" onclick="javascript:window.close(); return false;">关闭窗口</a></td>
  </tr>
  <tr>
   <td><table align="left" border="0" cellpadding="0" cellspacing="0" width="780">
      <tr>
       <td width="25" height="100%" bgcolor="#6A9ACB" ></td>
       <td><table align="left" border="0" cellpadding="0" cellspacing="0" width="728">
          <tr>
           <td width="728" height="100%">
          


      <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="1" class=thin >
     <tr  align=left class=font><td>车牌号</td><td>违章地点</td><td>违章时间</td><td>车主</td><td>车辆</td></tr>
<%
  if rs.eof then
    response.Write("<div align='center'><font color=red><b>没有违章信息!</b></font></div>")
  end if
do while not rs.eof
%>
       <tr align=center><td><%=rs("code")%> </td><td><%=rs("address") %> </td><td><%=rs("sdate")%> </td><td><%=rs("driver") %> </td><td><%=rs("car")%> </td></tr>

      <%
    rs.movenext
loop
%>
      </table>


      </td>
          </tr>
          <tr>
           <td width="728" height="7" bgcolor="#6A9ACB"></td>
          </tr>
        </table></td>
       <td width="27" height="100%" bgcolor="#6699CE"></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>


文章来自: Original
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 7 | 引用: 0 | 查看次数: 1033
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭