| | |
visual basic
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jan 2007
Posts: 5
Reputation:
Solved Threads: 0
hi there experts!!!im a new member in this site and i want to know certain thing about vb:
code of:
1.creating new password
2. adding new user
3. editing password
4. editing username
i know this is very simple for you guys i hope you can help me on this coz im just a starter in vb
thanks
seeker:mrgreen:
code of:
1.creating new password
2. adding new user
3. editing password
4. editing username
i know this is very simple for you guys i hope you can help me on this coz im just a starter in vb
thanksseeker:mrgreen:
you first have to learn how to interact with a database through VB. The DB could be as simple as a text file or very complex such as MS Access or SQL Server.
As for the db code, create a menu on the main form for those three options you posted. Options 1 and 2 can be combined because you can only create a new user by adding a new password. As for option 4 -- edit user name -- that is normally not allowed because the user name is a unique key field in the database. To edit user name you normally have to delete the current user and recreate it with the new name as a new user.
As for the db code, create a menu on the main form for those three options you posted. Options 1 and 2 can be combined because you can only create a new user by adding a new password. As for option 4 -- edit user name -- that is normally not allowed because the user name is a unique key field in the database. To edit user name you normally have to delete the current user and recreate it with the new name as a new user.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
•
•
Join Date: Jan 2007
Posts: 5
Reputation:
Solved Threads: 0
hi there!!for example i have these kind of forms:
UserName: __Textbox__
Current Password: _textbox__
enter new password: __textbox__
Re-enter password: __textbox__
_OK_ _CLEAR_ __SAVE__ __EXIT__ (Command button)
i have already set the DB file, the username and password, how can i run this??can you give me a sample code??
thank you very much=)
UserName: __Textbox__
Current Password: _textbox__
enter new password: __textbox__
Re-enter password: __textbox__
_OK_ _CLEAR_ __SAVE__ __EXIT__ (Command button)
i have already set the DB file, the username and password, how can i run this??can you give me a sample code??
thank you very much=)
•
•
Join Date: Jan 2007
Posts: 5
Reputation:
Solved Threads: 0
hi there!!for example i have these kind of forms:
UserName: __Textbox__
Current Password: _textbox__
enter new password: __textbox__
Re-enter password: __textbox__
_OK_ _CLEAR_ __SAVE__ __EXIT__ (Command button)
i have already set the DB file, the username and password, how can i run this??can you give me a sample code??
thank you very much=)
UserName: __Textbox__
Current Password: _textbox__
enter new password: __textbox__
Re-enter password: __textbox__
_OK_ _CLEAR_ __SAVE__ __EXIT__ (Command button)
i have already set the DB file, the username and password, how can i run this??can you give me a sample code??
thank you very much=)
How about something simple like (this code is not tested, use it just as a sample)
Your form structure:
Your form structure:
•
•
•
•
Username: [textbox]
Password: [textbox]
[ login(button) ] [ cancel (button) ]
visualbasic Syntax (Toggle Plain Text)
Private Sub Login_Click() Dim conn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim user As String Dim password As String user = txt_username.Text 'pull data from txt box password = txt_password.Text 'pull data from txt box conn.Open "your_database_connection_string" rs.Open "select * from your_login_table" 'make sure rs is not empty If rs.BOF = False Then While rs.EOF = False If user = rs.Fields("Column_Name_For_Username") And _ password = rs.Fields("Column_Name_For_Password") Then MsgBox "Validation successful" Exit Sub End If rs.MoveNext Wend MsgBox "No such user exists" Else MsgBox "The recordset is empty", vbCritical End If End Sub
Last edited by ~s.o.s~; Jan 9th, 2007 at 3:10 pm.
I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
![]() |
Similar Threads
- Playing .Wav/MIDI files in a Visual Basic Program (Visual Basic 4 / 5 / 6)
- Creating an OS in visual basic 6.0 (Visual Basic 4 / 5 / 6)
- The Move.....Visual Basic 6, Visual Basic .NET ? (VB.NET)
- Encrypting a Visual Basic application (Visual Basic 4 / 5 / 6)
- passing arrays in visual basic (Visual Basic 4 / 5 / 6)
- Visual Basic.net (VB.NET)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: ActiveX DLL reference
- Next Thread: VB Report
Views: 1411 | Replies: 7
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column component connection copy creat ctrl+f data database datareport date delete dissertations dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






