Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 3rd, 2007, 8:43 AM   #1
bigguy
Professional Programmer
 
bigguy's Avatar
 
Join Date: Sep 2005
Location: Arkansas
Posts: 296
Rep Power: 0 bigguy is an unknown quantity at this point
Send a message via AIM to bigguy Send a message via MSN to bigguy Send a message via Yahoo to bigguy
Exclamation File Beakpoints/Sections?

Hey yall. Right now, I'm making a program that you can make "admins" for the program, (not the computer admins). So what I was wondering is. Is there a way I can make sections, or breakpoints in a file, so when a new admin is created it wont overwrite the existing Admin(s). The is the layout I want kind of.

Admin Settings
Admin1
Username = Seth
Password = Hall
------------------------------------------- <<<Breakpoint
Admin2
Username = bigguy
password = smallbody
-------------------------------------------<<<Breakpoint

Just something like that. As long as it can keep them separate from each other, while they are in the same file. If it is possible how also can you look at specific sections, so when they login, I can see if they provided credentials match any of the file sections?

One more thing, the other day I was trying to code something to save computer logs to. So I used this
file.writealltext(my.computer.info.directorypath & "Logs for " & date.now & ".txt"

and I got a IO Exceptions. Any ideas where I can still use this format and it work?
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain

Destruction leads to a very rough road, but it also breeds creation.
bigguy is offline   Reply With Quote
Old Feb 3rd, 2007, 10:26 AM   #2
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 416
Rep Power: 3 Wizard1988 is on a distinguished road
Send a message via AIM to Wizard1988
You don't need breakpoints, just use some kind of a delimiter and append to the file.
__________________
JG-Webdesign
Wizard1988 is offline   Reply With Quote
Old Feb 3rd, 2007, 1:38 PM   #3
bigguy
Professional Programmer
 
bigguy's Avatar
 
Join Date: Sep 2005
Location: Arkansas
Posts: 296
Rep Power: 0 bigguy is an unknown quantity at this point
Send a message via AIM to bigguy Send a message via MSN to bigguy Send a message via Yahoo to bigguy
Thanks for the reply. Can you maybe show me a example of delimiting a file, I don't know how. Or just point me to a good tutorial. Thanks again.
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain

Destruction leads to a very rough road, but it also breeds creation.
bigguy is offline   Reply With Quote
Old Feb 3rd, 2007, 2:12 PM   #4
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4 Arevos is on a distinguished road
Seems to me like XML serialization would be your best bet in this case. You can set up a class, mark it with certain attributes, and automatically have it translated to and from XML. Here's a C# article on it. VB.NET works the same way, but I believe attributes in VB use <> rather than [].
Arevos is offline   Reply With Quote
Old Feb 3rd, 2007, 2:35 PM   #5
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 416
Rep Power: 3 Wizard1988 is on a distinguished road
Send a message via AIM to Wizard1988
By delimiter I ment that you should just have some symbol that would mean that its the end of one entry.

For example:

Admin Settings
Admin
Username = Seth
nimdA
Admin
Username = bigguy
password = smallbody
nimda

When you read the file you would look for those strings and you would know where the beggining and end are.

However you might want to go with XML.
__________________
JG-Webdesign
Wizard1988 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OnlineTextEditor.Com! Sane Show Off Your Open Source Projects 43 Jun 16th, 2006 8:55 AM
add mutiple users to the smbpasswd file. Pizentios Bash / Shell Scripting 3 Oct 20th, 2005 12:48 PM
After execution - Error cannot locate /Skin File? wchar Visual Basic 1 Mar 5th, 2005 9:04 PM
airport Log program using 3D linked List : problem reading from file gemini_shooter C++ 0 Mar 2nd, 2005 4:12 PM
Structure char field to a disk file ehab_aziz2001 C++ 0 Feb 10th, 2005 2:42 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:55 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC