Board index » off-topic » Microsoft Access ODBC Driver

Microsoft Access ODBC Driver


2004-02-21 06:53:08 AM
off-topic17
I am not sure my first try was posted so I posted this again!
I setup an ODBC connection using the Microsoft Access Driver and everything
works fine execpt I cannot eliminate the login dialog that comes up when I
make my table or query active. I tried using a combination with with my
table or query and using TDatabase component and without using the
TDatabase component but it makes no difference.
The TDatabase component requires the correct login name of "admin" but when
the dialog comes up from making the query or table active I can just hit
enter without entering in a username and password and the connection is
activated.
Does anyone know how to get around the login dialog?
Thanks,
Jeff
 
 

Re:Microsoft Access ODBC Driver

Jeff,
In Paradox, you can generally avoid the dialog by *not* setting
up a user name in the BDE alias, then by opening the database
using blank parameters for user name and password. (I'm sure the
ObjectPAL is completely different that Delphi or C (or whatever
you're using), but the concept should be the same.)
FWIW,
Liz
Jeff Howard wrote:
Quote

I am not sure my first try was posted so I posted this again!

I setup an ODBC connection using the Microsoft Access Driver and everything
works fine execpt I cannot eliminate the login dialog that comes up when I
make my table or query active. I tried using a combination with with my
table or query and using TDatabase component and without using the
TDatabase component but it makes no difference.

The TDatabase component requires the correct login name of "admin" but when
the dialog comes up from making the query or table active I can just hit
enter without entering in a username and password and the connection is
activated.

Does anyone know how to get around the login dialog?

Thanks,
Jeff
 

Re:Microsoft Access ODBC Driver

TDatabase
property LoginPrompt := false;
OnLogin
Occurs when an application connects to a database.
type TLoginEvent = procedure(Database: TDatabase; LoginParams:
TStrings) of object;
property OnLogin: TLoginEvent;
eded.
Jeff Howard wrote:
Quote
I am not sure my first try was posted so I posted this again!

I setup an ODBC connection using the Microsoft Access Driver and
everything works fine execpt I cannot eliminate the login dialog that
comes up when I make my table or query active. I tried using a
combination with with my table or query and using TDatabase
component and without using the TDatabase component but it makes no
difference.

The TDatabase component requires the correct login name of "admin"
but when the dialog comes up from making the query or table active I
can just hit enter without entering in a username and password and
the connection is activated.

Does anyone know how to get around the login dialog?

Thanks,
Jeff
 

{smallsort}

Re:Microsoft Access ODBC Driver

Thanks for the information!
I do have one other question that I think I already know the answer to. Can
I dynamically create Microsoft Access tables at runtime like I can Paradox
and DBase tables?
Thanks,
Jeff
"Jeff Howard" < XXXX@XXXXX.COM >wrote in message
Quote
I am not sure my first try was posted so I posted this again!

I setup an ODBC connection using the Microsoft Access Driver and
everything
works fine execpt I cannot eliminate the login dialog that comes up when I
make my table or query active. I tried using a combination with with my
table or query and using TDatabase component and without using the
TDatabase component but it makes no difference.

The TDatabase component requires the correct login name of "admin" but
when
the dialog comes up from making the query or table active I can just hit
enter without entering in a username and password and the connection is
activated.

Does anyone know how to get around the login dialog?

Thanks,
Jeff



 

Re:Microsoft Access ODBC Driver

Jeff,
see a sample code:
***********************************
Delphi tip#111: create table in MS Access with DAO
www.scalabium.com/faq/dct0111.htm
***********************************
"Jeff Howard" < XXXX@XXXXX.COM >wrote in message
Quote
Thanks for the information!

I do have one other question that I think I already know the answer to.
Can
I dynamically create Microsoft Access tables at runtime like I can Paradox
and DBase tables?

Thanks,
Jeff




"Jeff Howard" < XXXX@XXXXX.COM >wrote in message
news:40368ff2$ XXXX@XXXXX.COM ...
>I am not sure my first try was posted so I posted this again!
>
>I setup an ODBC connection using the Microsoft Access Driver and
everything
>works fine execpt I cannot eliminate the login dialog that comes up when
I
>make my table or query active. I tried using a combination with with my
>table or query and using TDatabase component and without using the
>TDatabase component but it makes no difference.
>
>The TDatabase component requires the correct login name of "admin" but
when
>the dialog comes up from making the query or table active I can just hit
>enter without entering in a username and password and the connection is
>activated.
>
>Does anyone know how to get around the login dialog?
>
>Thanks,
>Jeff
>
>
>


 

Re:Microsoft Access ODBC Driver

In addition to what Mike suggested, you can use ADOX (DDL for ADO), or
unlike Paradox/dBase you can actually issue CREATE TABLE ... statements in
SQL to create tables in an Access DB. However, with Access you need to have
a DB before you can create tables in the DB.
"Jeff Howard" < XXXX@XXXXX.COM >wrote in message
Quote
Thanks for the information!

I do have one other question that I think I already know the answer to.
Can
I dynamically create Microsoft Access tables at runtime like I can Paradox
and DBase tables?

Thanks,
Jeff




"Jeff Howard" < XXXX@XXXXX.COM >wrote in message
news:40368ff2$ XXXX@XXXXX.COM ...
>I am not sure my first try was posted so I posted this again!
>
>I setup an ODBC connection using the Microsoft Access Driver and
everything
>works fine execpt I cannot eliminate the login dialog that comes up when
I
>make my table or query active. I tried using a combination with with my
>table or query and using TDatabase component and without using the
>TDatabase component but it makes no difference.
>
>The TDatabase component requires the correct login name of "admin" but
when
>the dialog comes up from making the query or table active I can just hit
>enter without entering in a username and password and the connection is
>activated.
>
>Does anyone know how to get around the login dialog?
>
>Thanks,
>Jeff
>
>
>