473,750 Members | 2,559 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1365
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" programmaticall y? For example:

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

I can programmaticall y 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****@discuss ions.microsoft. com> wrote in message
news:2A******** *************** ***********@mic rosoft.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*******@hotm ail.com> wrote in message
news:e8******** ********@TK2MSF TNGP14.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******** ******@TK2MSFTN GP12.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*******@hotm ail.com> wrote in message
news:e8******** ********@TK2MSF TNGP14.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
25263
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 figured out that it is not possible to open the workbook for data access with ADO (http://support.microsoft.com/?KBID=211378). Is there another way to use a password protected Excel workbook in my
1
3603
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 also giving out the password using the below program but it is in some ascii code characters or to put more clear the password is encrypted ., well I need some code or a way to open this encrypted database with a password... thanx in advance......
3
1556
by: Anita Mossey | last post by:
Is there a way to automatically retrieve passwords with VBA, preferably with ADO as opposed to DAO?
1
3645
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. I need the program to prompt for a username and password if it tries to start the program and needs authentication. This should appear in practically the same way as if the user had typed the network path into their run box. If the user isn't...
5
11064
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 get some info out of the database that has been password protected. I use the following code: Public Sub GetSecInfo() Dim secSQL As String, uName As String Dim secRst As DAO.Recordset
0
1365
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 password many times. Is there any way to open a password-protected PDF with the password entered through python? Thanks
3
3768
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 system/program variables and data. But looking in google, there are plenty of programs a user can download to hack and crack that password.
4
2245
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 brought together under index.html. From the header frame I have a list of different options which when clicked change the body of the page, leaving the header page the same. I have added a page which uses a 'gatekeeper' to loosely password protect...
4
5219
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 LOAD -- SOURE CODE ****** strProvider = "Provider=Microsoft.Jet.OLEDB.4.0;" strSource = "Data Source=" & App.Path & "\MYDATABASE.MDB;UserID=UNKNOWN VALUE;Password=mypassword" ' Nothing I put into UserID in the above line appears to work ' If I...
0
9001
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8839
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9584
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9345
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8265
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4716
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4894
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.