| | |
VB6 Login
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jan 2008
Posts: 4
Reputation:
Solved Threads: 0
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
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
if you want to save your data in one server then make your connection direct to that server...
and how about the usernames and pw? where did you store it? I guess its in the database...
please be more specific...
regards,
jireh
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
data source="\\servername"
please be more specific...
regards,
jireh
Last edited by jireh; Jan 24th, 2008 at 8:58 pm.
A conclusion is the place where you got tired of thinking. http://www.martin2k.co.uk/forums/index.php?showforum=4
http://www.a1vbcode.com/a1vbcode/vbforums/Forum3-1.aspx
http://www.developerfusion.co.uk/for...orum&ForumID=4
•
•
Join Date: Jan 2008
Posts: 4
Reputation:
Solved Threads: 0
#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 ?
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 ?
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
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
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...
A conclusion is the place where you got tired of thinking. http://www.martin2k.co.uk/forums/index.php?showforum=4
http://www.a1vbcode.com/a1vbcode/vbforums/Forum3-1.aspx
http://www.developerfusion.co.uk/for...orum&ForumID=4
![]() |
Similar Threads
- VB6 login help (Visual Basic 4 / 5 / 6)
- Creating login screens in VB6 (Visual Basic 4 / 5 / 6)
- .:: Web Login Help ::. (Visual Basic 4 / 5 / 6)
- code for login and password..using vb6 (Visual Basic 4 / 5 / 6)
- Login Screen with VB6 and Access (Visual Basic 4 / 5 / 6)
- How to extract user network login name with vbscript? (Visual Basic 4 / 5 / 6)
- VB6 submit button sends information to BBChat (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Focus point
- Next Thread: inputting a single character in a textbox
| 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 calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis 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 subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





