473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Password Protected Program: How to do it?

Hello all,
I'm writing a program that interacts with databases. I want that when the
users run this program, they can view the data as much as they want. But if
they make any changes to the data and then attempt to update it, the program
will ask for a password. My question is, how can I go about doing this? I
can create a string variable and set it to something for the password, and
then check the user's input against this password value, but this will cause
the password to be fixed ---> Not good. So, I need some mechanism that
allows the password to be changed at runtime if the user wishes to.
Please give me some ideas like where I should store the passwords in the
program (not at an external file, because people may snoop around and find a
way to get into this file).
Thank you very much.
Stanav.
Nov 21 '05 #1
7 1342
Why not encrypt them and store them in the DataBase.
--
Dennis in Houston
"Stanav" wrote:
Hello all,
I'm writing a program that interacts with databases. I want that when the
users run this program, they can view the data as much as they want. But if
they make any changes to the data and then attempt to update it, the program
will ask for a password. My question is, how can I go about doing this? I
can create a string variable and set it to something for the password, and
then check the user's input against this password value, but this will cause
the password to be fixed ---> Not good. So, I need some mechanism that
allows the password to be changed at runtime if the user wishes to.
Please give me some ideas like where I should store the passwords in the
program (not at an external file, because people may snoop around and find a
way to get into this file).
Thank you very much.
Stanav.

Nov 21 '05 #2
Then I have to create another table in the database just for the password?
Why can't I use something such as a hidden control (label or textbox) and
set the control.Text = "password" programmatically? For example:

'In design view
-Add a Label control to the form (Label1)
-Set the Text property of Label1 to "Password"

I can programmatically change Label1.Text = "whatever" in code, but once the
form restart (a new instance) then Label1.Text is still "Password"... Is
there anyway to make Label1.Text = "whatever" permanently (not just during
runtime)?

"Dennis" <De****@discussions.microsoft.com> wrote in message
news:2A**********************************@microsof t.com...
Why not encrypt them and store them in the DataBase.
--
Dennis in Houston
"Stanav" wrote:
Hello all,
I'm writing a program that interacts with databases. I want that when the
users run this program, they can view the data as much as they want. But
if
they make any changes to the data and then attempt to update it, the
program
will ask for a password. My question is, how can I go about doing this? I
can create a string variable and set it to something for the password,
and
then check the user's input against this password value, but this will
cause
the password to be fixed ---> Not good. So, I need some mechanism that
allows the password to be changed at runtime if the user wishes to.
Please give me some ideas like where I should store the passwords in the
program (not at an external file, because people may snoop around and
find a
way to get into this file).
Thank you very much.
Stanav.

Nov 21 '05 #3
Stanav wrote:
Hello all,
I'm writing a program that interacts with databases. I want that when the
users run this program, they can view the data as much as they want. But if
they make any changes to the data and then attempt to update it, the program
will ask for a password. My question is, how can I go about doing this? I
can create a string variable and set it to something for the password, and
then check the user's input against this password value, but this will cause
the password to be fixed ---> Not good. So, I need some mechanism that
allows the password to be changed at runtime if the user wishes to.
Please give me some ideas like where I should store the passwords in the
program (not at an external file, because people may snoop around and find a
way to get into this file).
Thank you very much.
Stanav.


Store it in the database?

Chris
Nov 21 '05 #4
Stanav,

Did you ever look to the inbuild system from windows (search key isinrole on
msdn). It is easy to use although it is incredeble difficult described in my
opinion.

http://msdn.microsoft.com/library/de...roletopic2.asp

I hope this helps,

Cor
Nov 21 '05 #5
Stanav wrote:
Hello all,
I'm writing a program that interacts with databases. I want that when the
users run this program, they can view the data as much as they want. But if
they make any changes to the data and then attempt to update it, the program
will ask for a password. My question is, how can I go about doing this? I
can create a string variable and set it to something for the password, and
then check the user's input against this password value, but this will cause
the password to be fixed ---> Not good. So, I need some mechanism that
allows the password to be changed at runtime if the user wishes to.
Please give me some ideas like where I should store the passwords in the
program (not at an external file, because people may snoop around and find a
way to get into this file).
Thank you very much.
Stanav.


If you're determined to store your password in your code, don't store
the actual password but a hash/checksum or something like that. That wat
they can't look it up as easily.
Nov 21 '05 #6
Store an encrypted version in the database, the registry, or in a text file
(which can go in the user's application directory).

"Stanav" <st*******@hotmail.com> wrote in message
news:e8****************@TK2MSFTNGP14.phx.gbl...
Hello all,
I'm writing a program that interacts with databases. I want that when the
users run this program, they can view the data as much as they want. But
if they make any changes to the data and then attempt to update it, the
program will ask for a password. My question is, how can I go about doing
this? I can create a string variable and set it to something for the
password, and then check the user's input against this password value, but
this will cause the password to be fixed ---> Not good. So, I need some
mechanism that allows the password to be changed at runtime if the user
wishes to.
Please give me some ideas like where I should store the passwords in the
program (not at an external file, because people may snoop around and find
a way to get into this file).
Thank you very much.
Stanav.

Nov 21 '05 #7
Thank you all for the inputs. I'll probably go with the encrypted text file
route if I can't find a way to store it directly in the app.
Stanav.

"Marina" <so*****@nospam.com> wrote in message
news:ec**************@TK2MSFTNGP12.phx.gbl...
Store an encrypted version in the database, the registry, or in a text
file (which can go in the user's application directory).

"Stanav" <st*******@hotmail.com> wrote in message
news:e8****************@TK2MSFTNGP14.phx.gbl...
Hello all,
I'm writing a program that interacts with databases. I want that when the
users run this program, they can view the data as much as they want. But
if they make any changes to the data and then attempt to update it, the
program will ask for a password. My question is, how can I go about doing
this? I can create a string variable and set it to something for the
password, and then check the user's input against this password value,
but this will cause the password to be fixed ---> Not good. So, I need
some mechanism that allows the password to be changed at runtime if the
user wishes to.
Please give me some ideas like where I should store the passwords in the
program (not at an external file, because people may snoop around and
find a way to get into this file).
Thank you very much.
Stanav.


Nov 21 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Geert-Pieter Hof | last post by:
Hello, My VB 6.0 application read and writes data from and to a MS Excel workbook, using the Microsoft.Jet.OLEDB.4.0 provider. Now I want to protect the Excel workbook with a password, but I...
1
by: Pradeep Kumar | last post by:
Hi Everyone, Well Im trying to open a mdb which is password protected and when Im using the below code it was running perfectly for the mdb's created by me., but an mdb send by others to me is...
3
by: Anita Mossey | last post by:
Is there a way to automatically retrieve passwords with VBA, preferably with ADO as opposed to DAO?
1
by: Jefferson Cowart | last post by:
I am writting a program that has a button that a user can click to start isntalltions of various software across the network. Some of the software is on a network share that is password protected....
5
by: Joe-Paul | last post by:
Hi: I'm using VB 6.0 with an Access 2000 database. I set the password in the Access database to: abcdef1234. Then, using a MDIform, during the load event, I send the program to a procedure to...
0
by: sonicpulse | last post by:
Hello, I made a program that iterates through all the pdf's in a folder and opens them and prints them. However, all of these pdf's are password protected, so I have to manually type in the...
3
by: Miro | last post by:
Why Password protect an MDB when someone can google and get a hack? Wondering if anyone else has thought of this and just said "oh well"... I plan to password protect an MDB where I have some...
4
by: prophet | last post by:
so hopefully only one more question about this..... so I have a webpage using frames. I have a header and a column down the left, and the main body (all of which have different htmls but are...
4
by: larystoy | last post by:
Have password protected a large Access database and when trying to run the program in VB6 am getting following error when trying to run program: Not a valid account name or password ***** ON...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.