Board index » delphi » delphi, MS Access and 'login'

delphi, MS Access and 'login'

Can anyone help?

I am trying to use delphi to write front ends to MS Access databases.
Currently I am:
using the ODBC administrator to set up and alias for my database,
'linking' the alias with the database,
adding a 'database' component to my delphi form and choosing my alias as the
aliasName property, and setting login property to false,
adding a 'table' component, using my database alias as the databaseName
property, but when i try to set the tableName property a database login
prompt appears.

Why does the login prompt appear? At home i can just click on 'ok' and get
round it, but on the network it wont connect. Any help appreciated!!!!

Pete

 

Re:delphi, MS Access and 'login'


Quote
"pete" <peter.mulf...@btinternet.com> wrote in message <news:9u0ptc$qnj$1@neptunium.btinternet.com>...
> Can anyone help?

> I am trying to use delphi to write front ends to MS Access databases.
> Currently I am:
> using the ODBC administrator to set up and alias for my database,
> 'linking' the alias with the database,
> adding a 'database' component to my delphi form and choosing my alias as the
> aliasName property, and setting login property to false,
> adding a 'table' component, using my database alias as the databaseName
> property, but when i try to set the tableName property a database login
> prompt appears.

> Why does the login prompt appear? At home i can just click on 'ok' and get
> round it, but on the network it wont connect. Any help appreciated!!!!

login prompt will appear if you database.connected property is set to
false and in Params property password=''. So when you open the table
you are starting connection and since password='' login prompt
appears. To avoid this in designer double click Tdatabase and you will
get Params editor. Press default then edit password and user strings,
uncheck login prompt and save. In main form on activate event set
database.connected:=true.

Re:delphi, MS Access and 'login'


Thanks for this help. It seems to stop the login prompt at the codeing
stage, but i then get the prompt when i run the program. This is only really
causing a problem on the RM network where i cant seem to connect the program
to the database.

thanks for the help
Pete

Quote
"curious" <gil...@mail.ru> wrote in message

news:84b1a83c.0111272219.d752724@posting.google.com...
Quote
> "pete" <peter.mulf...@btinternet.com> wrote in message

<news:9u0ptc$qnj$1@neptunium.btinternet.com>...
Quote
> > Can anyone help?

> > I am trying to use delphi to write front ends to MS Access databases.
> > Currently I am:
> > using the ODBC administrator to set up and alias for my database,
> > 'linking' the alias with the database,
> > adding a 'database' component to my delphi form and choosing my alias as
the
> > aliasName property, and setting login property to false,
> > adding a 'table' component, using my database alias as the databaseName
> > property, but when i try to set the tableName property a database login
> > prompt appears.

> > Why does the login prompt appear? At home i can just click on 'ok' and
get
> > round it, but on the network it wont connect. Any help appreciated!!!!

> login prompt will appear if you database.connected property is set to
> false and in Params property password=''. So when you open the table
> you are starting connection and since password='' login prompt
> appears. To avoid this in designer double click Tdatabase and you will
> get Params editor. Press default then edit password and user strings,
> uncheck login prompt and save. In main form on activate event set
> database.connected:=true.

Other Threads