Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 14th, 2007, 03:06 PM
Registered User
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Shalinar
Default Login Application Help Please

Hello,
I am new to programming and I am trying to write a program that will let a user put in a user name and password which the program will check from information that is in a text file.... and can not figure it out.
I have the program working so that it will check one user name and password that is stored in a variable in the program but I want it to be able to use 1 of several users... can anyone help with this please? A starting point or something on that part of the code?
Thanks
 
Old July 15th, 2007, 12:39 AM
Registered User
 
Join Date: Dec 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You have not given enough information.
if you are using
 vb.net2003 or some other platform
do you have a data base with the program, if yes then what kind of adopter are you using




rSd
 
Old July 15th, 2007, 09:09 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You'll need to look at the classes in the System.IO namespace to understand how to read text files.

You could use the File.ReadAllLines method which will read all the lines from the file into a string array. You can then process the lines as required to create a list of users.

Better still would be to store the users as XML so you can use the native XML handling features of .NET to deal with that. If you structure the XML correctly you can read it directly into a DataSet so you don't even have to deal with any of the file parsing yourself. The DataSet class can load itself directly from XML. Then you can work with a table of users as if it came from a database.

-Peter
 
Old July 15th, 2007, 10:27 AM
Registered User
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Shalinar
Default

I'm sorry I thought that with me posting in the VB.NET 2003 folder that it was understood that was what I was using. no there is no database... it has to all be in a text file .

 
Old July 15th, 2007, 10:28 AM
Registered User
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Shalinar
Default

Quote:
quote:Originally posted by planoie
 You'll need to look at the classes in the System.IO namespace to understand how to read text files.

You could use the File.ReadAllLines method which will read all the lines from the file into a string array. You can then process the lines as required to create a list of users.

Better still would be to store the users as XML so you can use the native XML handling features of .NET to deal with that. If you structure the XML correctly you can read it directly into a DataSet so you don't even have to deal with any of the file parsing yourself. The DataSet class can load itself directly from XML. Then you can work with a table of users as if it came from a database.

-Peter
How do I use a XML file? Sorry really new to all of this ... and am just trying to learn a bit from it ... thanks again in advance

 
Old July 16th, 2007, 01:01 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What is your level of experience with:

- General programming
- XML
- VB.NET

It would help us to know what you are familiar with so we don't provide answers you already know. If you are generally unfamiliar with a particular topic, I'd suggest doing some googling to get the basics first.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Login Application load Testing with JMeter SambaLH BOOK: Expert One-on-One J2EE Design and Development 1 April 16th, 2014 04:24 AM
Bugbase - Selected application on login nakori BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 June 23rd, 2008 12:56 PM
Application control is redirecting to the login pa anup_daware .NET Framework 2.0 1 May 13th, 2008 03:13 AM
Login/Password Java application larry Apache Tomcat 2 December 20th, 2005 04:42 AM
a login procedure for a wap application ammy Classic ASP Databases 0 March 23rd, 2004 09:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.