ACC: How to Query an ORACLE Table Without Attaching ItID: Q109824
|
Advanced: Requires expert coding, interoperability, and multiuser skills.
This article describes how to use the SQL IN clause to query an ORACLE
database without linking (attaching) it.
In Microsoft Access, this can be accomplished more easily by using a SQL
pass-through query. See the "References" section of this article for a
reference to this method.
You can use the IN clause to query only one external database at a time.
The IN clause requires two arguments: database name and connect string.
When you attach ORACLE tables, specify an empty string for the database
name.
The connect string consists of the following items:
t: for TCP/IP
x: for IPX/SPX
p: for Named Pipes
ODBC;DSN=DataSourceName;Database=x:SrvrName;WSID=Wrk1;USID=JaneDoe;_
PWD=ABC123
Select *
FROM Employees
IN "" "ODBC;dsn=Corp;database=p:Payroll;uid=JSmith;pwd=KL3d";
For more information on the SQL IN clause, search for "In Clause"
using the Microsoft Access for Windows 95 Help Index.
Microsoft Access "User's Guide," version 2.0, pages 273 and 276
Microsoft Access "Language Reference," version 1.1, Appendix B,
"Microsoft Access SQL," page 513
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: April 2, 1999