|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I know this is a relatively simple thing to do, but I can't manage to figure this out. I really need help. I am to design a VB login form for my system. Everything else is done, except for ensuring that a valid user has logged in to the system. A table in a database keeps all the user information (Login ID, Password, etc). How do I do this? Thanks very much for any help. |
|
#2
|
|||
|
|||
|
You need a form to get the username/password, then you need code that tests that username/password against the database values and proceeds if the validation tests succeed.
It's pretty simple but not trivial, try a google search or search this forum.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Thanks for the advice.
I coded the lines below for my cmdLogin command button in the login form, but a run-time error 91 was generated when a user presses the cmdLogin button. The error occured at the "Do Until .EOF" line. What could be wrong? I've checked this several times already, but I still cannot find the fault behind this. What do I do now? I really need help here. Here's the code lines. Quote:
|
|
#4
|
|||
|
|||
|
Where are you creating the adologin recordset?
Also you should try stepping through your vb code with the debugger, usually you can easily find the cause of code errors. |
|
#5
|
|||
|
|||
|
The adoLogin recordset is created in this VB login form itself (not in other separate forms).
I've tried using the debugger and it says the error occured at the "Do Until .EOF" line. Can't figure out what is wrong about this one. Please help. |
|
#6
|
|||
|
|||
|
The error indicates you don't have a recordset object. Double check the adodc control (if that's what you're using). Maybe your recordsource is incorrect in the control.
|
|
#7
|
|||
|
|||
|
Yes, I'm using ADO data control for this VB login form.
I've double-checked the recordsource for this adoLogin and all settings are correct. What could be wrong? Please help. Thanks very much once again. |
|
#8
|
|||
|
|||
|
Use the debugger to isolate the problem.
|
|
#9
|
|||
|
|||
|
Dear Doug,
Thanks for the much help given. I've found out that I would need to create two TextBoxes, one for holding the UserName and another for holding the Password. These two Textboxes are not visible and have their data members' values set to the ADO Data Control with their data fields' values set accordingly. Then only was I able to run the login program successfully. However, this login form that I've been working on for so many days here is interacting with an MS Access database for testing purposes. Actually I am to create a login form for my Virus Scan Tracking Maintenance System, which is to connect with the MS SQL Server 2000 database. When I tried out the coding (like the one posted earlier) and made the necessary changes / adjustments, I have this message (before the program execution): "SELECT permission denied on column 'Password' of object 'table_Login'." And, upon pressing the Login button, I have the same error (like before) and this error occured at the line "Do Until .EOF". What should I do now? I think I am not supposed to interact directly with the SQL Server database for this particular table, because its Password column is protected? (The password in the table is of the varbinary datatype.) I really need help here. I've been working on this for a long time already. How can I proceed now? Any help at all is much appreciated. Thanks very much. |
|
#10
|
|||
|
|||
|
The error you posted is coming from the database, not VB.
Start by looking in Books Online (BOL) for sql server. There is a lot to sql server access permissions. Maybe try asking in a sql server forum. |
|
#11
|
|||
|
|||
|
Thanks a lot for the much help given, Doug.
I've just managed to get my login codes done yesterday. I've also changed much of my coding to adjust to the SQL Server database settings. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > VB Login |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|