[AccessD] Querying the back end directly

Dan Waters df.waters at comcast.net
Fri Apr 26 09:18:22 CDT 2013


Hi John,

Are you trying to connect to an Access BE?

If so, the syntax is this:

stg = "SELECT Field1, Field2 FROM tblMain IN '" & stgBEFullPath & "'"

stgBEFullPath is a variable for the full path to the Access BE, which of
course you can change as needed.  I believe from 'old memory' that the speed
difference compared to a normal link to an Access BE wasn't much if
anything.  Anyway, a test would be easy.

See this: http://msdn.microsoft.com/en-us/library/bb177907.aspx
And
http://blogs.office.com/b/microsoft-access/archive/2009/03/27/accessing-exte
rnal-data-using-the-in-clause.aspx

According to these sites, you can also use IN with a variety of external
types of databases, not just Access tables.

Good Luck!
Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W Colby
Sent: Friday, April 26, 2013 7:41 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Querying the back end directly

I know that queries can be constructed to use a "SELECT FROM
ExternalFileName.Table" kind of syntax.  In other words, not linking a table
out in the BE but in the query referencing the external database (or
spreadsheet etc) and then a table inside of that.

First of all I need to know whether that is faster, slower or no difference.

I need to be able to modify that to modify the location of the back end
file.  While I can open the query def and search through the sql for the
file name I would really prefer not to.  Is it possible to use this kind of
thing using an ODBC connect string?  Or does an ODBC connect string assume a
database server / engine at the other end?

--
John W. Colby

Reality is what refuses to go away
when you do not believe in it

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list