ASP生成新会员编号

时间:2014-08-09 18:39:48   收藏:0   阅读:235
Function MakeUserCode
    OpenDB()
    Randomize
    dim getid_rs,getid
    set getid_rs=rsobj
    do while true
        getid="CN"&int(rnd()*(10^6))
        getid_rs.open "select * from Members where User_Account=‘"&getid&"",con
        if getid_rs.bof or getid_rs.eof then
            getid_rs.close
            exit do
        end if
        getid_rs.close
    loop
    set getid_rs=nothing
    MakeUserCode = getid
    CloseDB()
End Function

 

ASP生成新会员编号,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!