| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 392 人关注过本帖
标题:[求助]定义一函数不知道参数怎么传?????
只看楼主 加入收藏
changhai_14
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2006-5-3
收藏
 问题点数:0 回复次数:1 
[求助]定义一函数不知道参数怎么传?????

function showsname(username)
set conn_l=opendb
set rs_1=server.createobject("adodb.recordset")
sql_1="select * from StuInfo where StuID=_____"
rs_1.open sql_1,conn_l,1
if not rs_1.eof and not rs_1.bof then
showsname=rs_1("StuName")
else
showsname=" "
end if
set rs_1=nothing
call closedb(conn_l)
end function
不知道参数username 怎样形式写到横线上.它的数据类型是char

搜索更多相关主题的帖子: 函数 定义 参数 
2006-05-12 16:01
islet
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:89
帖 子:6548
专家分:0
注 册:2005-1-28
收藏
得分:0 
function showsname(username)
set conn_l=opendb
set rs_1=server.createobject("adodb.recordset")
sql_1="select * from StuInfo where StuID='"&username&"'"
rs_1.open sql_1,conn_l,1
if not rs_1.eof and not rs_1.bof then
showsname=rs_1("StuName")
else
showsname=" "
end if
set rs_1=nothing
call closedb(conn_l)
end function
2006-05-12 17:06
快速回复:[求助]定义一函数不知道参数怎么传?????
数据加载中...
 
   



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

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