1樓:網友
資料庫在開啟一次時,必須要關閉,方可再次開啟;
open之後要close
乙個open 對應乙個 close
sql, conn, adopenkeyset, adlockpessimistic
if then
msgbox "未找到相關紀錄,請檢查!",vbokonly + vbexclamation, "警告"
exit sub
else if msgbox "舊密碼不對,請重新輸入!",vbokonly + vbexclamation, "警告"
exit sub
end if
set rs = nothing
else =
msgbox "密碼修改成功!",vbokonly + vbinformation, "提示"
=end if
end if
2樓:網友
else =
msgbox "密碼修改成功!",vbokonly + vbinformation, "提示"==
end if
end if
3樓:網友
你出錯的原因是資料庫沒有即時關閉!
if msgbox "舊密碼不對,請重新輸入!",vbokonly + vbexclamation, "警告"
else ===應該在這裡加**。
set rs = nothing
sql = select * from 使用者資訊 where 使用者名稱='"trim( +
sql, conn, adopenkeyset, adlockpessimistic
msgbox "密碼修改成功!",vbokonly + vbinformation, "提示"
vb做的系統的登陸密碼的修改**
4樓:網友
private sub command1_click()
確認修改密碼提交。
if text1(0).text = "" then
msgbox "你沒有輸入名稱,請重新輸入!", 16, "錯誤!"
exit sub
elseif text1(1).text = "" then
msgbox "你沒有輸入原密碼,請重新輸入!", 16, "錯誤!"
exit sub
elseif text1(2).text = "" then
msgbox "你沒有輸入新密碼,請重新輸入!", 16, "錯誤!"
exit sub
elseif text1(3).text = "" then
msgbox "你沒有再次輸入新密碼,請重新輸入!", 16, "錯誤!"
exit sub
end if
if text1(2).text <>text1(3).text then
msgbox "你輸入的新密碼和再次輸入的新密碼不符,請重新輸入!", 16, "錯誤!"
exit sub
end if
if text1(0).text <>yhmc then
msgbox "你輸入的名稱不是你的名稱,請重新輸入!", 16, "錯誤!"
exit sub
end if
if text1(1).text <>yhmm then
msgbox "你輸入的原密碼不是你的密碼,請重新輸入!", 16, "錯誤!"
exit sub
end if
call conn
strsql = "select * from 資料表 where 使用者名稱='" & text1(0).text & "' and 密碼='" & text1(1).text & "' "
set rs =
if not then
rs!密碼 = text1(2).text
msgbox "祝賀您!你的管理員密碼修改成功!", 48, "修改成功!"
elsemsgbox "沒有你查詢的記錄!", 16, "錯誤!無記錄!"
end if
set rs = nothing
set conn = nothing
end sub
5樓:王秀華
這也太簡單了吧!!你看看別的書,都有的!
vb如何實現修改密碼的功能?求**和方法
6樓:網友
private sub command1_click()
dim getmima as string, j as integer, mima as string
取得密碼。with adodc1
connectionstring = conn
commandtype = 8
recordsource = "select * from login where username='" & userlogo & "'"
refresh
getmima = ."pass")
end with
檢確認密碼與新密碼是否一致。
if trim(text1(2).text) msgbox "您輸入的新密碼與確認密碼不符,請重新輸入! ", vbexclamation, "提示"
text1(1).text = ""
text1(2).text = ""
text1(1).setfocus
elseif digeststrtohexstr(text1(0)) = getmima then
with adodc1
pass") = digeststrtohexstr(text1(1))
end with
msgbox "非常好!密碼已經修改完畢。請您牢記! ", vbexclamation, "提示"
unload me
elsemsgbox "原密碼不對,請確認後繼續! ", vbexclamation, "提示"
text1(0).text = ""
text1(1).text = ""
text1(2).text = ""
text1(0).setfocus
end if
end if
end sub
7樓:棘棘芽
我寫過關於這個方面的,如果是你的要的你可以參考下。
vb中如何修改密碼
8樓:網友
比如還有乙個form2
那你在form2裡面來修改form1裡的東西時,前面加上form1. 就行了啊。
比如要修改form1裡的乙個按鈕上的文字 那就這麼寫。
aaaaaa"
9樓:網友
在模組中定義乙個公共變數儲存當前使用者,全程式中到處可用多好,反正都有模組了!
10樓:乖
sql = select * from zlb where 使用者名稱='"trim( )和if = trim( then 除錯下看,有時候因為有空格而導致等式判斷不成立。
可以將這個函式做成main函式作為程式入口點。
sql = select * from zlb where 使用者名稱='"trim( &
vb修改資料庫密碼**
11樓:智者總要千慮
if = 1 then '點選「修改密碼」核取方塊。
if = "" then '使用者名稱為空的話,不能修改密碼。
r = msgbox("沒有選擇使用者!")exit sub
end if
12樓:匿名使用者
太複雜了,給人家乙個簡單點的吧。
vb怎麼設定賬號密碼?
13樓:匿名使用者
private sub command1_click()if = "username" and = "password" then '帳號為username,密碼為password
msgbox "輸入正確", vbinformation, "提示"
unload me
elsemsgbox "帳號或密碼錯誤", vbcritical, "提示"
end if
end sub
private sub form_load()= ""
登陸"end sub
14樓:匿名使用者
1.在access中建立表,名為user,在表user中建立兩欄位,user_name,user_password(這些都可以自己命名的)
2.接連資料庫,讀取使用者名稱和密碼。這個不用說了吧。
3.判斷使用者名稱和密碼。用讀取出來的使用者名稱和密碼與輸入的比較。
如:讀取出來的資料為username,userpasswordif trim( and trim( thenmsgbox "使用者名稱和密碼正確。「
在這裡加入進入窗體的**。』'
elsemsgbox "使用者名稱或密碼錯誤。」
endif流程就是這樣子,自己擴充套件吧。
也可以用select * form user where user_name=username and user_password=userpassword
如何用vb6.0設定乙個修改密碼的按鈕?
15樓:網友
你需要將密碼存放在某個地方,比如某個檔案或者登錄檔裡面,每次登陸需要提出該值與輸入的值對比,判斷是否可以登陸,修改密碼時需要將新密碼替換舊密碼寫入檔案或登錄檔。
用vb與sql server如何實現登入密碼的修改?
16樓:網友
舉例資料庫為sqlusers,使用者表為:users,使用者名稱欄位:username,使用者密碼欄位:userpassword
public rs as new
public conn as new
public sub connopen() '開啟資料庫。
on error goto connopenerror
driver=;server=(local);uid=sa;pwd=123456;database=sqluser"
exit sub
connopenerror: msgbox
end sub
public sub connclose() '關閉資料庫。
on error goto conncloseerror
if = 1 then
set conn = nothing
end if
exit sub
conncloseerror: msgbox
end sub
private sub command1_click()
if = "" then
msgbox "對不起,請選擇使用者名稱!", vbinformation
exit sub
elseif = "" then
msgbox "對不起,請輸入舊密碼", vbinformation
exit sub
elseif = "" then
msgbox "對不起,請輸入新密碼", vbinformation
exit sub
end if
select * from users where username = '" & "'", conn, 1, 3
if and then
msgbox "對不起,使用者名稱不存在!", vbinformation
elseif <>rs("userpassword") then
msgbox "對不起,舊密碼錯誤!", vbinformation
elsers("userpassword") =
end if
end sub
private sub form_load()
connopen
end sub
private sub form_unload(cancel as integer)
connclose
end sub
VB密碼讀取,vb做個密碼輸入
你實現學習一下vb和access資料庫的連線,問題就十分簡單了。用vb怎樣把輸入的密碼變成星號 顯示出來?只要將textbox設定屬性parrwordchar為 即可,如 textbox元件使用雖然比較簡單,但textbox類的構成成員卻是非常的豐富。在一般性的程式設計中,主要涉及到三類 屬性 方法...
怎麼修改wifi密碼,如何修改WiFi密碼?
蝸牛p科技 檢視無線wifi密碼的方法 1.有線連線無線路由器。2.開啟電腦瀏覽器,輸入路由器背後銘牌的閘道器ip地址 一般是192.168.1.1 輸入路由器閘道器賬號密碼,進入閘道器配置介面。如果閘道器賬號密碼也忘記,可以長按reast按鈕重置無線路由器。3.進入無線設定頁面 無線安全 祕鑰,即...
怎樣修改密碼?怎麼修改密碼?
1 進入qq帳號中心,點選修改密碼,按提示操作即可。2 如果您設定了安全手機,您可以用安全手機簡訊 mm qq號碼 新密碼 新密碼不能包含 如 mm mima 123 移動使用者傳送至 1066170099 聯通使用者需先 查詢您所在省服務號碼 重設密碼,隨時隨地保護帳號安全。3 如果您忘記了qq帳...