473,760 Members | 10,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple Passwords

This is the code that I currently Have for one password
how do I specify multiple ones? There is no "or"
statement! What do I do?

Private Sub LoginBTN_Click( ByVal sender As System.Object,
ByVal e As System.EventArg s) Handles LoginBTN.Click
If PassINP.Text = "bluecats" And UserINP.Text
= "Joshua" Then Dim frmMainApp As New frmMainApp() :
frmMainApp.Show () Else End
End Sub
End Class

Nov 20 '05 #1
4 1227
On Sun, 9 Nov 2003 11:00:52 -0800, Joshua Kendall wrote:
This is the code that I currently Have for one password
how do I specify multiple ones? There is no "or"
statement! What do I do?

Private Sub LoginBTN_Click( ByVal sender As System.Object,
ByVal e As System.EventArg s) Handles LoginBTN.Click
If PassINP.Text = "bluecats" And UserINP.Text
= "Joshua" Then Dim frmMainApp As New frmMainApp() :
frmMainApp.Show () Else End
End Sub
End Class


What do you mean there is no "Or"? sure there is.
You can write:
If txt.text = "x" or txt.text="y" then
'do something
end if

you can also use a "case" for this sort of thing:
select case txt.Text

case "a","b","c"
'do something

case else
msgbox "bad password"
end select

note, however, that it is considered bad form to hard code passwords inside
your code. It is better to save to in a database or at least the config
file of your application so they can later be changed and maintained
without having to recompile your code.
another bad thing that can happen: your code can be "decompiled " using a
tool like "Refelctor" or "Anakrino" and the passwords can be taken from it
easily.
That's why it's usually better to save the passwords in an encrypted state
somewhere as well.

--
Roy Osherove
weblog: http://www.iserializable.com
Nov 20 '05 #2
Thank you the "or" statement was in the wrong place,
that's why it wasn't showing up valid. How could I access
passwords if I saved them in a dbase III file? and how
could I encode them?

Thanks for the help!

Joshua Kendall
Nov 20 '05 #3
"Joshua Kendall" <jo****@goartic .com> wrote...
This is the code that I currently Have for one password
how do I specify multiple ones? There is no "or"
statement! What do I do?


Joshua... what are doing? You are posting messages under various accounts
and you start new threads all the time.

I tried to explain it earlier and you are doing the same thing now. The
"write a line of code" post a question methodology. My suggestion is to
stop and think. Design something that makes sense rather than coding
whatever strikes you this minute. A couple of messages ago it was a timer
issue on a dialog box, now it is how to hardcode a bunch of account/password
pairs and in another thread you have the "splash screen won't go away"
problem.

You are designing an unmaintainable mess and that can't be your purpose.
How can you even ask about how to access data from a dBASE file if you can't
turn the timer off or make the splash screen disappear? You aren't 100
lines of code away from finishing this, you are conceptually _eons_ away.
You have your spaceship launched and you are radioing back to Earth, "which
way is Mars?"

Consider pseudocode. Know what you are trying to program before you spend
your time (and ours) trying to code something that won't work should you be
lucky enough to remove all the bugs. Contrary to popular belief software
development isn't a matter of overcoming bugs... it's an engineering task.
Try (I'm trying to be helpful) reading the code you just posted... you
created a variable frmMainApp in the event handler. Where do you think that
variable will go when the event handler ends?

I think we are all wondering is it a password application you're writing
because so far you don't have that. Finish the application first and add a
password layer around it. No architect I know of designs the stairs to the
building "before" they have designed the building itself.

Finish frmMainApp()... have it operate without any worry about whether some
stranger has gained access (they won't have if you don't finish the app.)
Then when it is all finished post a single question (if a Google search
doesn't answer it) similar to "how do I add account/password verification to
my app?"

I may sound rude but I'm saving you 40 hours of posting questions. Nobody
wants to explain how to hide your splash screen when it starts the app
because nobody would do it that way. At least not "twice" :-)

"Slow down" I don't know how many times I have suggested programmers
"program" by simply taking their fingers off the keyboard.

Tom



Nov 20 '05 #4
Cor
Hi Tom,

I am looking to it and see everytime another come in. Good that you wrote
this, but this I found specialy good.
Finish frmMainApp()... have it operate without any worry about whether some stranger has gained access (they won't have if you don't finish the app.)


ROFL but with sence

Cor
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
4073
by: Miranda | last post by:
Hi, I have a ASP/vbscript program that generates random passwords. The problem is I need to insert those passwords into an Access database of 327 clients. I have the random password program generating the 327 passwords, but have had no luck inserting them. =============================================== Here is the code that generates the passwords: =============================================== <% Option Explicit %>
2
1162
by: Mr. Bungle | last post by:
Hello, I have a password management database in which I can scroll through a list of employees for a specific location. I have a nifty generate password procedure that we use to change passwords on a monthly basis. The Problem: It takes quite awhile to run the procedure on each employee (over 250)and update all the passwords.
2
1849
by: TechBoy | last post by:
I am trying to learn on the fly about Access Security for an app we are developing. I realize Access security is an advanced subject with many details. I wanted to share a scenario and ask a couple of questions. Scenario: I have MyApp.MDB up on a file server. I also have two Client PC's: Client1 and Client2 who use MyApp. (Both Client's are running Access 2002) On Client1's PC:
18
3396
by: Gleep | last post by:
I've searched google intensely on this topic and it seems noone really knows how to approch this. The goal I don't want clients to give out their usernames and passwords to friends, since the site relies on subscrption fees. Sessions ID's are matched between the browser and the server. So a users can login with same username and password and those sessions are tracked individually. Some suggest create table fields with the session ID...
19
2449
by: Cord-Heinrich Pahlmann | last post by:
Hi, I have written a tool wich de/encrypts a few of my forum and bloggin-Passwords. My question is how secure it is. The following describes how I have encrypted my passwords. When I log in, the Login-Password is changed into a md5-Hash and is compared to the login-password in the db. If the passwords are the same the use is logged in (common procedure). Then the clear-text
3
1667
by: anuragpj | last post by:
i have designed a login page like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Electrical Engineering Dept IITK</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!--
2
2103
by: Simon.Whiteside | last post by:
If someone has created a database for me and transferred it over is there any way that I can check I have full access to all areas? I am a beginner with Access and so the development has been done by a temporary employee who has now handed the database over to me. Not that I think he is an untrustworthy character but I would sleep easier at night if I could check he has given me 100% of the database and three months down the line I am...
5
4399
by: arlu1221 | last post by:
I have a mdb that needs to be used by multiple users. I am aware of the Tools -> Security option to create multiple users. However, do i need to create a table in the mdb too that keeps track of the user ids & passwords? How about changing passwords? Where and how is it done?
7
2273
by: wozza | last post by:
hi I'm a Dreamweaver user who's created a few simple data entry/ registrations forms in my time, but I'm not really a coder (though I can follow instructions and am not afraid to dabble...) - I generally make use of DW's builtin commands and some extensions. Anyway I'm creating a registration site for event exhibitors and I've been asked to come up with a method of automatically generating passwords for inserted records, either as...
0
9333
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9945
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9765
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8768
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7324
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3863
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3442
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.