![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
|
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. |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: Oct 2005
Location: Chitown
Posts: 422
Rep Power: 4
![]() |
You don't need breakpoints, just use some kind of a delimiter and append to the file.
|
|
|
|
|
|
#3 |
|
Professional Programmer
|
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. |
|
|
|
|
|
#4 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
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 [].
|
|
|
|
|
|
#5 |
|
Professional Programmer
Join Date: Oct 2005
Location: Chitown
Posts: 422
Rep Power: 4
![]() |
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. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OnlineTextEditor.Com! | Sane | Show Off Your Open Source Projects | 43 | Jun 16th, 2006 9:55 AM |
| add mutiple users to the smbpasswd file. | Pizentios | Bash / Shell Scripting | 3 | Oct 20th, 2005 1:48 PM |
| After execution - Error cannot locate /Skin File? | wchar | Visual Basic | 1 | Mar 5th, 2005 10:04 PM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 5:12 PM |
| Structure char field to a disk file | ehab_aziz2001 | C++ | 0 | Feb 10th, 2005 3:42 PM |