I am building an application that uses a username/passworm form for login and want to load from a flat file info relevant to the username entered in the login form. Will the code for the reading of the flat file go in the form_load of my second form this is the code I am trying to develop with no success:
Public Class frmMenu
Dim intcount As Integer
Dim Client(-1) As ClientInfo
Private Sub frmMenu_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
lblWName.Text = frmLogin.txtUsername.Text
Dim objReader As New System.IO.StreamReader("Accounts.txt")
Do Until (ClientInfo.ClientName) = lblWName.Text
With Client(Client.Length - 1)
.Checking = objReader.ReadLine
.Savings = objReader.ReadLine
.ClientName = objReader.ReadLine
End With
Loop
objReader.Close()
Software/Hardware used:
Visual Studio 2010/Toshiba Satallite/Windows 7
ASKED:
April 30, 2011 9:28 AM
UPDATED:
September 26, 2011 9:59 AM
“with no success”
What exactly does that mean ?
Are you getting errors (at compile time, or run time) ?
What is “ClientInfo” ? a class ?
Also, what is the structure of the file ?
Thankyou. Just your response helped me out with taking a different perspective. I revised the code I had and found the answer ClientInfo was a stucture that I did not need. Good day to you
Great.
Thanks for the feedback.