asunpraise
MIS
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 & " " & _
"WHERE IDATE<#" & E + 1 & "#);"
Set qdf = dbs.CreateQueryDef("MAKETABLE", strSQL)
DoCmd.OpenQuery "MAKETABLE", acViewNormal
DoCmd.DeleteObject acQuery, "MAKETABLE"
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 "CON" in every single SQL statement.
Thanks a million.
Lea
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 & " " & _
"WHERE IDATE<#" & E + 1 & "#);"
Set qdf = dbs.CreateQueryDef("MAKETABLE", strSQL)
DoCmd.OpenQuery "MAKETABLE", acViewNormal
DoCmd.DeleteObject acQuery, "MAKETABLE"
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 "CON" in every single SQL statement.
Thanks a million.
Lea