Board index » delphi » How do I use security features from Delphi

How do I use security features from Delphi

I am a Delphi programmer working on my first serious database application. I
am using Delphi 2 client/server suite, although for now the access I have to
the data is entirely local. My program queries the database with SQL through
the BDE to the Access 97 ODBC driver and displays the results of the query.
When I started the project the database was unprotected; when I ran my
program and it accesed it, something (Access or the driver, not my program)
would ask for a username and a password, but no matter what I typed there it
gave me access to the information. Recently, however, I decided to protect
the database (the only existing user for now is Admin, i.e. me) and it
happens that, if I work with Access I have to log on and everything works
well, but my program still queries the database and shows the result no
matter what I type in that little logon window. If someone knows what is
happening, I would appreciate some help. Thanks in advance,

Fernando

p.s. Please reply to fpene...@diveo.net.ar

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

 

Re:How do I use security features from Delphi


If you are using an alias, set the System Database to the workgroup file. If
you are using a TDatabase, put the System Database= in the parameter list of
the TDatabase.

--

Woody

Quote
<fpene...@diveo.net.ar> wrote in message

news:78n5va$u17$1@nnrp1.dejanews.com...
Quote
>I am a Delphi programmer working on my first serious database application.
I
>am using Delphi 2 client/server suite, although for now the access I have
to
>the data is entirely local. My program queries the database with SQL
through
>the BDE to the Access 97 ODBC driver and displays the results of the query.
>When I started the project the database was unprotected; when I ran my
>program and it accesed it, something (Access or the driver, not my program)
>would ask for a username and a password, but no matter what I typed there
it
>gave me access to the information. Recently, however, I decided to protect
>the database (the only existing user for now is Admin, i.e. me) and it
>happens that, if I work with Access I have to log on and everything works
>well, but my program still queries the database and shows the result no
>matter what I type in that little logon window. If someone knows what is
>happening, I would appreciate some help. Thanks in advance,

>Fernando

>p.s. Please reply to fpene...@diveo.net.ar

>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

Re:How do I use security features from Delphi


If you are using a TDatabase component, set the LogonPrompt property to
False. If you aren't using a TDatabase, use one - it will make converting to
a new database a breeze if you ever have to. The default session will always
ask for a log in, but your database might not care about the results.

If you need to supply a password, then you can put something like the
following in the Params property of the TDatabase:

SERVER NAME=MyServer
USER NAME=MyName
PASSWORD=MyPassword

Christopher Latta

Quote
fpene...@diveo.net.ar wrote in message <78n5va$u1...@nnrp1.dejanews.com>...
>I am a Delphi programmer working on my first serious database application.
I
>am using Delphi 2 client/server suite, although for now the access I have
to
>the data is entirely local. My program queries the database with SQL
through
>the BDE to the Access 97 ODBC driver and displays the results of the query.
>When I started the project the database was unprotected; when I ran my
>program and it accesed it, something (Access or the driver, not my program)
>would ask for a username and a password, but no matter what I typed there
it
>gave me access to the information.

Other Threads