Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Reading in VB6
Name: Duncan Date: August 21, 2003 at 12:07:38 Pacific OS: Windows Xp Pro CPU/Ram: 3.0 HT/2 GB
Comment:
I am looking to load a .txt file that would have all the users and pw that were created, well trying to log in, it goes through the file finds the name then checks to see if the PW matches the Username. Thanks!
Have you looked into reading each login entry of the file into a string and using the the Split function to extract username and password into their own variables, then compare the two as needed? The split function depends on how your login entries are delimited.
Infinite Recursion
0
Response Number 4
Name: Duncan Date: August 21, 2003 at 18:49:22 Pacific
Reply:
I don't know how to use the split function, do you know where I could find a tutorial or could you show me how on here, you can email me at dbgrazier@snet if you know how thanks.
'str' is a string containing a line of your login file... You can split the input string based off of a Carriage Return and Line Feed delimeter.
The code below shows this and just displays the results inside of a message box. You can use a while loop and do this for all files, acting / comparing on the segments of str as needed...
------- content = Spilt(str,vbCrLf) For i = LBound(str) to UBound(str) Msgbox str(i) Next i -------
Summary: Carven: To read from a file in VB6, try this: Private Sub Reading_Click() Dim variable1 As String Open "c:\My Documents\sample.txt" For Input As #1 Input #1, variable1 Text1.Text = variabl...
Summary: ---Sci-Guy--- "I usually prefer just to be pointed in the right direction so I can try to figure it out myself. I'm just trying to learn VB and find it better if I have to do some work myself." I sha...
Summary: I am trying to make a program in C++ to read in a bunch of numbers from a file "frames.txt" like shown here: Frame: 00 FE 08 08 00 60 00 23 A1 23 0E 9C FE 03 5B 6D 77 64 57 65 63 64 61 63 63 CE FE FF...