ACC: How to Query SQL Server Tables Without Linking/AttachingID: Q101375
|
Advanced: Requires expert coding, interoperability, and multiuser skills.
This article describes how to use the SQL IN clause to query an SQL
Server table without linking (attaching) it.
You can use IN to query only one external database at a time.
The IN clause requires two arguments: database name and connect string.
When you link SQL Server tables, you must specify an empty string for the
database name. The connect string consists of the following items:
Data Source Name (DSN) The name of the SQL Server computer
Database Name (DATABASE) The name of the SQL Server database
Workstation ID (WSID) The name of the workstation that is
making the connection (optional)
User ID (UID) The login ID*
Password (PWD) The user password*
* This item is optional within the connect string. If it is not
present, the system prompts the user with a dialog box to enter this
information the first time the macro is executed each session.
ODBC;DSN=ServerName;Database=Pubs;WSID=Wrk1;USID=JaneDoe;PWD=ABC123
For more information using Microsoft Access as a front end, search for
"SQL," and then " SQL Databases" using the Microsoft Access for Windows 95
Help Index.
For more information about the IN clause, search for "IN (SQL)," and then
"IN Clause (SQL)" using the Microsoft Access for Windows 95 Help Index.
Additional query words: attach remote data source
Keywords : kbusage OdbcOthr
Version : 1.0 1.1 2.0 7.0
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: March 25, 1999