Board index » delphi » Connect to access without DSN

Connect to access without DSN

Can someone tell me a "quick and dirty" way to connect to an Access .mdb
file with TADOConnection without needing to specify a DSN or link file.
(i.e. just the path to the mdb file in the connection string)

Richard Ireland

--

  D R A G N E T  -- solutions for your eBusiness --

  http://www.dragnet.com.tw

  Richard Ireland <rich...@dragnet.com.tw>
  CEO, Dragnet International,
  7F, No.753, Min Tsu E. Rd.,
  Taipei 105, Taiwan R.O.C.

  Cellular: +886 933 064 587
  Fax:      +886 2 8770 6387
  Work:     +886 2 8770 6386
  ICQ:      9046459

------------------------------------------------------------------------

 

Re:Connect to access without DSN


Quote
>Can someone tell me a "quick and dirty" way to connect to an Access .mdb
>file with TADOConnection without needing to specify a DSN or link file.
>(i.e. just the path to the mdb file in the connection string)

If you are using the Jet 4 provider you specify the database location as part of
the Connection string.    DSN is only for the ODBC provider which you really
should not be using.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Connect to access without DSN


Or you just enter your mbd name in the dialog ie Mydatabase.mbd,
ensuring you only have one copy on the sys.
David

"Brian Bushay TeamB" <BBus...@Nmpls.com> wrote in message
news:c00rhtspl99dkf15c1rvqeiniv46m3vsm8@4ax.com...

Quote

> >Can someone tell me a "quick and dirty" way to connect to an Access
.mdb
> >file with TADOConnection without needing to specify a DSN or link
file.
> >(i.e. just the path to the mdb file in the connection string)

> If you are using the Jet 4 provider you specify the database
location as part of
> the Connection string.    DSN is only for the ODBC provider which
you really
> should not be using.

> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Other Threads