Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to Oracle

Status
Not open for further replies.
Nov 16, 2002
24
US
I need to import data from Oracle database to Access, and I'm already done with it. The connection variable is:

CON = "IN RPD[ODBC;SERVER=aserver;UID=DDDD;PWD=XXXXX]"

The problem is that I have to import more than one tables, and every time when I have sql statement such as:


'COPY BENEFITS_RECEIVED FROM ORACLE

strSQL = "SELECT * INTO BENEFITS_RECEIVED FROM ALL_RECEIVED " & CON & " " & _
"WHERE CLI_CLIENT_ID IN (SELECT CLI_CLIENT_ID FROM ALL_RECEIVED " & CON & " " & _
&quot;WHERE IDATE<#&quot; & E + 1 & &quot;#);&quot;
Set qdf = dbs.CreateQueryDef(&quot;MAKETABLE&quot;, strSQL)
DoCmd.OpenQuery &quot;MAKETABLE&quot;, acViewNormal
DoCmd.DeleteObject acQuery, &quot;MAKETABLE&quot;

data source window pops up, which means if I have 20 tables needing to be imported, I have to click on the data source name 20 times. How would I solve this problem? I wish there is a one time connection instead of putting &quot;CON&quot; in every single SQL statement.

Thanks a million.
Lea
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top