Solved

Connecting to Access

Posted on 1998-09-02
2
138 Views
Last Modified: 2010-04-04
Hi. I want to connect to an Access database. I have tried doing it, it works, but everytime I start the program, it asks for a login & Password. I can click enter (The database is not secure) but it's annoying. The Best way would be if I COULD put a password, but let my application enter it automatically. Another solution, is to use the users protection scheme. Because I WILL use users in my application, I CAN use the login to the Database as my user's account (It can ever save me some time, and password encoding...) But How do I know, in runtime, in my program, which user is using the database?

I hope I am clear,
                     Ron.
0
Comment
Question by:ShadowHawk071998
2 Comments
 

Accepted Solution

by:
ellessar earned 100 total points
ID: 1338476
You can use the GetUserName function to find out what
the name of the current logged on user is, alternatively
you can prompt your user for a password and username
and assume that this will hold true for the entire
session. In your TDatabase component just add the following parameters
  user name = (add user name)
  password = (add password)
then set the loginprompt property to false (to prevent
the database component for prompting for a connection)programatically once the user has logged on. You may
also want to use a generic read only logon and password
to access a users permissions tables prior to actually performing the logon.
0
 

Author Comment

by:ShadowHawk071998
ID: 1338477
Thanks. But I have to say that I had one trouble: YOu have to write it without spaces :
user name=
password=yourpassword

or it doesn't work (And it took me the better part of an hour to get it right...)

bye!

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Performance of SQL statement 37 137
Delphi: Connect to running MS Outlook 4 162
Adoquery sql  left join does not work 25 104
DBCtrlGrid, Delphi, Scroll 7 32
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question