Board index » delphi » Access, D4 and logging on

Access, D4 and logging on

Sorry, I cant get this from the online manuals!

When I connect to a TTable with an Access database behind it the user gets a
login prompt.

This Access database doesn't use any security and I dont want the login
prompt. The manuals suggest using the TDatabase (perhaps in conjunction with
a TSession component), which I dont think need, but it isnt clear how the
TTable componet links to the TDatabase component.

?!

Thanks in advance for any help

Mark Beachill

 

Re:Access, D4 and logging on


There is an automatic TDatabase component generated when you do not actually
specify one.  TO override the Access login:

a)  add you own TDatabase to your form or data module
b) set the alias name to the name of the access database alias you have.
c) set the database name to the same name as the database name in the ttable...
note:  when I first did this I discovered the two can be the same (alias name
and database name) but to avoid confusion I have made them different names
d) set login prompt to false.

Quote
Mark Beachill wrote:
> Sorry, I cant get this from the online manuals!

> When I connect to a TTable with an Access database behind it the user gets a
> login prompt.

> This Access database doesn't use any security and I dont want the login
> prompt. The manuals suggest using the TDatabase (perhaps in conjunction with
> a TSession component), which I dont think need, but it isnt clear how the
> TTable componet links to the TDatabase component.

> ?!

> Thanks in advance for any help

> Mark Beachill

--
Wayne Herbert
Manager, Computer Products
Key Maps, Inc.
1411 West Alabama
Houston, TX  77006

Vox:  713.522.7949
Fax:  713.521.3202
Email:  wherb...@keymaps.com

"Everywhere I go, I'm asked if I think universities stifle writers. My opinion
is that they don't stifle enough of them."

Flannery O'Connor (1925-1964)

Re:Access, D4 and logging on


And make sure that the TDatabase is being created before any TQueries or
TTables are opened against the alias.  A common problem is that people
forget to correct the creation order to get the TDatabase connected up
first.

Jeff Overcash

Quote
Wayne Herbert wrote:

> There is an automatic TDatabase component generated when you do not actually
> specify one.  TO override the Access login:

> a)  add you own TDatabase to your form or data module
> b) set the alias name to the name of the access database alias you have.
> c) set the database name to the same name as the database name in the ttable...
> note:  when I first did this I discovered the two can be the same (alias name
> and database name) but to avoid confusion I have made them different names
> d) set login prompt to false.

Re:Access, D4 and logging on


<snip>
Quote
> a)  add you own TDatabase to your form or data module
> b) set the alias name to the name of the access database alias you have.
> c) set the database name to the same name as the database name in the
ttable...
> note:  when I first did this I discovered the two can be the same (alias
name
> and database name) but to avoid confusion I have made them different
names
> d) set login prompt to false.

<snip>

In the workaround above you mentioned the use of an Alias name to connect
to
the Access database.  Is there a way to connect with to an Access database
by path/file name instead of using an Alias and still be able to link
TTable's to
the TDatabase?

Re:Access, D4 and logging on


Yes, you can add a Params to the TDatabase like this:

Database Name=c:\directory\database.mdb

*Note the space between Database and Name.....

Woody

Quote
Pat Riley wrote in message <01be0a26$1851c680$6500a8c0@test1>...
><snip>
>> a)  add you own TDatabase to your form or data module
>> b) set the alias name to the name of the access database alias you
have.
>> c) set the database name to the same name as the database name in
the
>ttable...
>> note:  when I first did this I discovered the two can be the same
(alias
>name
>> and database name) but to avoid confusion I have made them
different
>names
>> d) set login prompt to false.
><snip>

>In the workaround above you mentioned the use of an Alias name to
connect
>to
>the Access database.  Is there a way to connect with to an Access
database
>by path/file name instead of using an Alias and still be able to link
>TTable's to
>the TDatabase?

Re:Access, D4 and logging on


That worked.  Thanks.  I have figured out that to use the MSACCESS driver
you either have to use an alias or a whole bunch of Params to the
TDatabase.  Fortunatly, if you just double click the non-visible TDataBase
on your form and choose the "Defaults" it will create a template of all of
the required Params for the MSACCESS driver setup page.

Thanks again...

Woody <woody....@ih2000.net> wrote in article
<722h09$n...@forums.borland.com>...

Quote
> Yes, you can add a Params to the TDatabase like this:

> Database Name=c:\directory\database.mdb

> *Note the space between Database and Name.....

> Woody

Other Threads