以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  注册时提示不能注册相同的用户名。  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=98514)

--  作者:地瓜
--  发布时间:2017/3/31 9:41:00
--  注册时提示不能注册相同的用户名。
注册时如何提示不能注册相同的用户名。谢谢!

图片点击可在新窗口打开查看此主题相关图片如下:用户注册.jpg
图片点击可在新窗口打开查看
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:办公管理云平台.zip




--  作者:有点色
--  发布时间:2017/3/31 9:43:00
--  

查找是否重复

 

http://www.foxtable.com/webhelp/scr/0396.htm

 


--  作者:地瓜
--  发布时间:2017/3/31 9:46:00
--  
是在当前表中查找吗?谢谢!
--  作者:有点色
--  发布时间:2017/3/31 9:49:00
--  
Dim txt_paw As WinForm.TextBox = e.Form.Controls("txt_paw")
Dim txt_username As WinForm.TextBox = e.Form.Controls("txt_username")
If txt_username.Value = "" Or txt_paw.Value="" Then
    Messagebox.show("用户名和密码不能为空!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
Dim fdr As DataRow = DataTables("tblusers").SQLFind("usname = \'" & txt_Username.Text & "\'")
If fdr IsNot Nothing Then
    Messagebox.show("该用户名已被注册!请使用其他用户名","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
Dim r As Row=Tables("tblusers").AddNew
r("usname")=txt_username.Value
r("paw")=txt_paw.Value
r.Save()
Messagebox.show("账号注册成功!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)

--  作者:地瓜
--  发布时间:2017/3/31 10:29:00
--  
谢谢!