|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Hi all,
i am creating a login sreen using vb6+ms access2000. when user want to login to the system, he will key in usename n password, system thn check with access database whether the username n password are correct, if yes thn allow login. So, what's the method to do it? pls advise ...thanks for ur help!! Regards Shanny |
|
#2
|
|||
|
|||
|
Quote:
There are so many ways to do it. It depends for whom you are trying to build the application for. If it is for a professional company then you will need secure classes for in between data exchange security. If it is for minor organisation then still security is very important. But if you are trying to just learn on your own (which I think you are), then just write simple functions to 1) open the database connection 2) read the username one at a time to see if the match is found, if yes then check that if the corresponding password matches, if yes then provide access, other give invalid password error or user not found error. 4)dont forget the close the connection when you dont need to use the database. This also depends what kind of application you are developing. For small application at home use or testing, I would normally open the connection when the program starts and close the connnection when the program ends. But then there is a risk. If the program crashes in the middle, then the connection may still be open, and when you try to connect the next time, you may be denied access. In this case you may need to reboot the computer/server to clean the ram. I hope this enough for you to get started. Shaz |
|
#3
|
|||
|
|||
|
that means i have to write some coding that can check whether the username are vary with the password, rite? can u show me a sample on how the code look like?
i have link the form with the database, but aside to the coding... i have no idea on it! can u pls show me the code?? thanks in advanced! Regards shanny |
|
#4
|
|||
|
|||
|
Quote:
Of course you have to write some coding, and thats what visual basic is. It is for programmers, it is a programming language. Why you wanna do the above anyway? If you new to VB, this is not a good place to start learning it. Learn the VB basic's first. By me giving you any code will not help you. I am at work and my text books are at home, so I cannot remember the exact codes. If you start and have errors, I may be able to help you, but not everything from scratch... Most ADO textbooks will be help ful to you.Try and grab one and you will see the solution. Hope this helps. Shaz. |
|
#5
|
|||
|
|||
|
Quote:
erm ok thanks for ur advised. i do in that way cause that is one part of my assignment given. so i have to try todone it. Anywhere, i will trying to do it, if i cant solve it, i will post my code here, n hope u will gv further advise, thanks in advanced. |
|
#6
|
|||
|
|||
|
sample code
you said you are a beginner? well this code will be just for you. your tutor wont be angry with you for this.
i used textboxes which will be visible.false. The code extracts records from a database based on the username. it then checks to see if the password typed in a textbox2 matches that in a textbox which gets data from the database. NB-->Just an example you wont get an 'A' with this code. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Login Program using vb6 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|