"DBG" <(E-Mail Removed)> wrote in message
news:CF45C002-8B8F-4834-A1B7-(E-Mail Removed)...
> > I simply meant that when you create the Connect property for the
> > pass-through query, you must select an ODBC connection. You can use a
DSN,
> > or (my preference) an ODBC DSN-less connection string.
>
> Thanks, any tips or can you point me to a tutorial about pass-through
> queries using ODBC DSN-less connections? This seems like the best way to
go
> about connecting, short of someone on the SQL Server lists telling me I'm
> being dumb.
You shouldn't really require a tutorial. With any pass-through query, you
need to assign a value to its Connect property. You simply need to know what
the Connection string is. With SQL Server 2000, using Trusted Connection, I
use:
"ODBC;DRIVER={sql
server};DATABASE=DatabaseName;SERVER=ServerName;Trusted_Connection=Yes;"
(replacing DatabaseName and ServerName with the appropriate values)
For other possibilities, check Carl Prothman's site
http://www.carlprothman.net/Default.aspx?tabid=90
>
> I tried to post on the VB forums but the not nice forum admin removed my
> post (go figure)
What forum? Couldn't have been one of the Microsoft ones, as there are no
forum admins.
> Am I correct in assuming that with pass-through queries I continue to use
DAO?
The query is a query. You can run it using DAO or ADO, although I suspect
DAO would be more efficient. (If using ADO, remember that you're running a
query in the MDB, so that's what your connection string needs to be)
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)