loading....

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
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

 

posted on 2014-08-09 17:43  程序加载中  阅读(188)  评论(0编辑  收藏  举报