Board index » delphi » Delphi3 and Access Databases

Delphi3 and Access Databases

I am new to delphi and have a problem getting rid of the logon prompt
that keeps
comming up when I run an application that uses an Access local database.

The database resides in the same directory as the project.
I have created an alias for the database and my table component points
to the alias.

However whenever I run the app it requests a userid and password...Is
there any way
of avoiding this.

Kevin

 

Re:Delphi3 and Access Databases


Follow this steps:

on the database component select:

1) Params  and enter the text:

   USER= your_user_name
   PASSWORD= your password

2) Set the property LoginPrompt to False

And that's it ... you can also do this by clicking twice in the database
component

Hope it helps
---------------------------------------------------
Rui Valdemar Pereira Madaleno

Re:Delphi3 and Access Databases


Some corrections:

1. Set Database1.AliasName to the alias name you were using.
2. Set Database1.DatabaseName to a new (temporary) alias name.
3. Change DatabaseName of all your TTable's, TQuery's and TStoredProc's to
the new temporary alias name.
4. Set LoginPrompt to False and set Params.Values['USER NAME'] to the user
name (if any) and Params.Values['PASSWORD'] to the password (if any).

"Rui Madaleno" <rui...@ninf.ubi.pt> schreef in bericht
news:8n4d58$fuq$1@venus.telepac.pt...

Quote
> Follow this steps:

> on the database component select:

> 1) Params  and enter the text:

>    USER= your_user_name
>    PASSWORD= your password

> 2) Set the property LoginPrompt to False

> And that's it ... you can also do this by clicking twice in the database
> component

> Hope it helps
> ---------------------------------------------------
> Rui Valdemar Pereira Madaleno

Other Threads