Board index » delphi » Adding an ODBC connection with Delphi

Adding an ODBC connection with Delphi

Does anyone know how to check if an ODBC connection exists, and to create it
if not?

...Lars

 

Re:Adding an ODBC connection with Delphi


Check the Registry!

On Wed, 29 Nov 2000 06:33:45 GMT, "Lars Martinsen"

Quote
<l...@stripeset.com> wrote:
>Does anyone know how to check if an ODBC connection exists, and to create it
>if not?

>...Lars

Re:Adding an ODBC connection with Delphi


Hi Pin Lu..

Thanks...I've done that, but is there any way to check the connectivity?

And..does someone know how to set it up from Delphi code?

..Lars

Quote
"Pin Lu" <P...@stredo.com> wrote in message

news:3a2af0f2.13958987@8.8.8.88...
Quote
> Check the Registry!

> On Wed, 29 Nov 2000 06:33:45 GMT, "Lars Martinsen"
> <l...@stripeset.com> wrote:

> >Does anyone know how to check if an ODBC connection exists, and to create
it
> >if not?

> >...Lars

Re:Adding an ODBC connection with Delphi


You can't check if an ODBC connection exists, only if a ODBC DSN exists !
Try using SQLAllocEnv, SQLAllocConnect and SQLConnect followed by
SQLDisconnect, SQLFreeConnect and SQLFreeEnv to check if you can make an
ODBC connection.

ps. If you don't have the ODBC API file send me an e-mail...

"Lars Martinsen" <l...@stripeset.com> schreef in bericht
news:dr1V5.1759$Pe4.197272@juliett.dax.net...

Quote
> Does anyone know how to check if an ODBC connection exists, and to create
it
> if not?

> ...Lars

Other Threads