Dear All,

 I am a new entrant in the **DANIWEB**.I am a beginner in Visual Basics.Self studying through browsing the net.I want to make a small programme to be used by 5 or 6 users.in a stand alone computer.How this user management system can be coded.The following operations are required.

1.Add a User
2.Modify a user-his name or something
3.Change the password of a user by himself
4.Delete a user from the user's list.
Please help me

Dani AI

Generated

Practical, low‑risk plan for a small standalone VB user-management module.

Keep each user as a single structured record (suggested fields: numeric id, username, display name, password_hash, salt, role, created_at, updated_at). For a 5–6 user app the simplest reliable flow is: load the whole store into memory at startup (array/list/dictionary keyed by id or username), let the UI operate on that in-memory collection, then persist changes by writing the full store back to disk atomically (write to a temporary file and rename). That makes Add, Modify and Delete trivial: add a new record (use max id + 1), locate and edit by id for modify, remove the record for delete, then save the collection.

Password handling and “change password” rules: never store plaintext. Store a per-user random salt and a salted hash (use a modern hash like SHA‑256 or better). When a user changes their password require the current password, verify it by hashing with the stored salt, then replace salt+hash with a new pair. Mask password inputs in the UI and consider a “force change on next login” flag for admin resets.

Practical UI and implementation tips: present a selectable list or grid of users, show an edit form when one is selected, validate uniqueness for usernames, and enforce a minimum password policy. Use safe file writes (temp file + rename) to avoid corruption and keep an automated backup copy. For single‑user standalones you can avoid a full database; if later you need faster searches or transactions, move to an embedded SQL engine or to VB.NET for easier cryptography support.

Notes on the thread: ’s initial file‑append approach explains why modify/delete felt hard — rewriting the store is the usual fix. ’s suggestion to use structured storage is the right direction for scale. ’s UI tip solved the uppercase input issue and is a useful detail for form behavior.

Recommended Answers

All 7 Replies

U want to save the username & password in what type of database?

If you are a learner, then start at the begining!! you need to show us what you have learned so far so we can help you...

no code, no help

Dear gee,
I have no much idea about the database. I am familiar with foxpro database files .dbf
Dear AndreRet,
I tried to up load the codes here. it is showing always some kind of error message
Now I try to quote below a portion of the code for adding a new user.
usid=(txtusid.text) usnme=(txtusnme.text)
open app.path & "\Becos\user.txt" for append as #1
write #1,usid,usnme
close 1
To some extend it works but the difficulty is when there are many users added how can i modify one user, given the user id or how can i delete one particular user

You will need to get the user's id into memory first. Once you have that, you can call that user and edit what you need to.

Which database are you using, MS Access? If so, it is much quicker to get a specific user from a structured sql statement.

Let me know, I'll give you some code samples.

Dear AndreRet,
I think my question is too early to ask, as I am only a beginner. I am not familiar with MS Access. I am good at Ms Foxpro .dbf files

OK leave it .

But can you help me in another field ?
I want to change the in put of a input box or field to upper case when we press the enter key after typing,even if the caps lock key is not on.
What is the code for it?

 -->>Simple way wihtout much bleeding on ur fingers try 'UCase()'
 -->>Two Text boxes on ur interface and One Button & code the following on the button
     Private Sub Command1_Cklick()
     Text2.Text=UCase(Text1.text)
     end sub
 -->>Just to get an Idea,though iz another way if u 'll think this one is not Cul...

Thank you dear, But You coded for the command buttons' click event

I asked for the Kee Press event of the Text Box...I got it myself
Thank you once again The following code will work

Quoted Text Here

Private Sub Text1_keypress(Keyascii as integer)
Select case keyascii
case vbkeyreturn
  TEXT1.SELSTART=0
  text1.sellength=len(text1.text)
  text1.seltext=Ucase$(Text1.text)
      if text1="" then
       lblmsg="enter text in text box"
       text1.setfocus
       else
       text2.setfocus
       end if
  end select
 End sub 

Quoted Text Here

Thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.