VB6 Login

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2008
Posts: 4
Reputation: macbrutal is an unknown quantity at this point 
Solved Threads: 0
macbrutal macbrutal is offline Offline
Newbie Poster

VB6 Login

 
0
  #1
Jan 24th, 2008
Sorry for "spamming" But this is really really important for a school project.
1. Can anyone of you paste me back the whole code that will make a textbox
saying,"username already taken" When you try to create different account with same username.
2. If possible, publishing the program and then people creates accounts and it saves
on 1 server that will let them login from different computers, because this won't work
with other people from other computers.

Thanks once again / macbrutal

------------------------------------------------------------------------
Private Sub Command1_Click()
Dim namefile As String
namefile = Text1.Text

Open App.Path & "\Accounts\" + namefile + ".txt" For Output As #1
Print #1, Text1.Text
Print #1, Text2.Text
Print #1, Text3.Text
Print #1, Text4.Text
Close #1

MsgBox "Thank you for your registration, please login!"
Form2.Show
Form1.Hide

End Sub
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 65
Reputation: bushman_222 is an unknown quantity at this point 
Solved Threads: 4
bushman_222's Avatar
bushman_222 bushman_222 is offline Offline
Junior Poster in Training

Re: VB6 Login

 
0
  #2
Jan 24th, 2008
We're here to help, not do your school work!

I'm more than happy to point you in the right direction, but you have to help your self

What are :
text1..text
text2.text
text3.text
text4.text

May I suggest a naming convention
for example a text box, prefix the name with txt
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 300
Reputation: jireh is an unknown quantity at this point 
Solved Threads: 43
jireh's Avatar
jireh jireh is offline Offline
Posting Whiz

Re: VB6 Login

 
0
  #3
Jan 24th, 2008
if you want to save your data in one server then make your connection direct to that server...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. data source="\\servername"
and how about the usernames and pw? where did you store it? I guess its in the database...

please be more specific...

regards,

jireh
Last edited by jireh; Jan 24th, 2008 at 8:58 pm.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 4
Reputation: macbrutal is an unknown quantity at this point 
Solved Threads: 0
macbrutal macbrutal is offline Offline
Newbie Poster

Re: VB6 Login

 
0
  #4
Jan 25th, 2008
#Busman_222.
I just want the program to look up in the "Account" folder, after a namefile that's been registered, and if so then msgbox "username already exists"
text1.text = Username
text2.text = Password
Skip the rest of it.
#Jireh.
Open App.Path & "\Accounts\" + namefile + ".txt" For Output As #1
It saves in the account folder i have where the project is saved.

You think you can help me ?
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 65
Reputation: bushman_222 is an unknown quantity at this point 
Solved Threads: 4
bushman_222's Avatar
bushman_222 bushman_222 is offline Offline
Junior Poster in Training

Re: VB6 Login

 
0
  #5
Jan 25th, 2008
Are you using the text file as a database?

using text files for username/passwords are not idea, MS Access would be better because you can have tables and use SQL to speed up the program.

How are you opening the text file to check the username/password against the users input? (random or input)

What you could do is :
load the whole file (depending on size) to an array then then search the array
Could always check the file line by line, (not very good practice) for the username.

You need to think which way you want before you can code. Either way that function will contain a loop to carry this out
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 300
Reputation: jireh is an unknown quantity at this point 
Solved Threads: 43
jireh's Avatar
jireh jireh is offline Offline
Posting Whiz

Re: VB6 Login

 
0
  #6
Jan 27th, 2008
I agree to bushman, its not good to store usernames and passwords in a txtfile... they are prone in hacking... its better to put that on a database...
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC