| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 533 人关注过本帖
标题:[求助]又提示我至少有一个参数未被指定,帮忙啊...谢谢!!
只看楼主 加入收藏
zmyzzz
Rank: 1
等 级:新手上路
帖 子:145
专家分:0
注 册:2005-9-21
收藏
 问题点数:0 回复次数:2 
[求助]又提示我至少有一个参数未被指定,帮忙啊...谢谢!!

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% option explicit dim conn,db,rs,sql dim aa,uid uid=Request("id") aa=1 db="/newgzl/mdb/login.mdb" Set conn = Server.CreateObject("ADODB.Connection") conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db) sql="select * from gonggao where id='&uid'" Set rs = Server.CreateObject("ADODB.RecordSet") rs.Open sql,conn,1,1 %> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; } --> </style><title><%=rs("zhuti")%></title> <table width="780" border="0" cellpadding="0" cellspacing="0"> <tr> <td><img src="../img/logo2.gif" width="780" height="50"></td> </tr> </table> <table width="780" border="0" cellpadding="0" cellspacing="0"> <tr> <td><form name="form1" method="post" action=""> <table width="100%" border="0" cellpadding="0" cellspacing="0" > <tr> <td width="26%" nowrap>&nbsp;</td> <td width="45%" nowrap><div align="center"> <h2><%=rs("zhuti")%></h2> </div></td> <td width="29%" nowrap>&nbsp;</td> </tr> <tr> <td nowrap>&nbsp;</td> <td nowrap><div align="center"></div></td> <td nowrap>&nbsp;</td> </tr> <tr> <td nowrap>&nbsp;</td> <td nowrap>&nbsp;</td> <td nowrap>&nbsp;</td> </tr> <tr> <td nowrap>&nbsp;</td> <td nowrap>&nbsp;</td> <td nowrap>&nbsp;</td> </tr> </table> </form></td> </tr> </table>

怎么又提示我至少有一个参数未被指定....出错行是红字的行.... 帮我看看好么??谢谢!!!

搜索更多相关主题的帖子: 参数 提示 
2005-09-28 11:51
islet
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:89
帖 子:6548
专家分:0
注 册:2005-1-28
收藏
得分:0 
这句错了:sql="select * from gonggao where id='&amp;uid'"

uid是数字的sql="select * from gonggao where id="&amp;uid
uid是文本的sql="select * from gonggao where id='"&amp;uid&amp;"'"
2005-09-28 12:01
zmyzzz
Rank: 1
等 级:新手上路
帖 子:145
专家分:0
注 册:2005-9-21
收藏
得分:0 
哦....谢谢.... 还有一个疑问.....如果有and呢? 这么写对不对(uid是数字的,type是文本的) sql="select *from gonggao where type='"&type&"' and id="&uid 还是 sql="select *from gonggao where id="&id& and type='"&type&"'" 怎么写好象都不对的样子.....应该怎么写啊??谢谢islet咯...........

吾尝终日而思之,不如须臾之所学也
2005-09-28 14:06
快速回复:[求助]又提示我至少有一个参数未被指定,帮忙啊...谢谢!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011878 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved