Board index » delphi » Which driver am I using? (Jet vs ODBC)

Which driver am I using? (Jet vs ODBC)

I've managed to make the transition from BDE to ADO (hooray!).

I've given my users the opportunity of editing the connection string and of
changing the database in use (using editconnectionstring(adoconnection)).
The application works with both the Jet 4 and ODBC driver (rather to my
surprise!).

However if the users set up the ODBC driver the second option of opening
another database gives an error.  How can I reliably detect if they are
using Jet or ODBC?  Then I can stop the error.  I know I can get the
provider property from the connection string but do these remain the same on
all installations or do they change?

Andrew

 

Re:Which driver am I using? (Jet vs ODBC)


odbc don't allow multiple connects as you know..
just perform a TRY connect... Except in your code to test it.

Andrew & Jenny Skinner wrote:

Quote
> I've managed to make the transition from BDE to ADO (hooray!).

> I've given my users the opportunity of editing the connection string and of
> changing the database in use (using editconnectionstring(adoconnection)).
> The application works with both the Jet 4 and ODBC driver (rather to my
> surprise!).

> However if the users set up the ODBC driver the second option of opening
> another database gives an error.  How can I reliably detect if they are
> using Jet or ODBC?  Then I can stop the error.  I know I can get the
> provider property from the connection string but do these remain the same on
> all installations or do they change?

> Andrew

Re:Which driver am I using? (Jet vs ODBC)


Quote
>However if the users set up the ODBC driver the second option of opening
>another database gives an error.  How can I reliably detect if they are
>using Jet or ODBC?  Then I can stop the error.  I know I can get the
>provider property from the connection string but do these remain the same on
>all installations or do they change?

The Provider property will be the same for all Jet 4 Ole db connections.
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Which driver am I using? (Jet vs ODBC)


Thanks.  Obvious really.  

AS

Other Threads