Solved

Load Oracle tbl using pass through query

Posted on 2002-03-19
4
436 Views
Last Modified: 2006-11-17
What is the syntax for loading an Oracle from an access tbl using a pass through query?  I'm not sure how to reference the access table in the sql statement.

0
Comment
Question by:martinre
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Expert Comment

by:ornicar
ID: 6880958
The pass through query will be executed on the server side, so I'm afraid that your Access table will not be seen from there. Can't you use a normal query to populate the Oracle linked table thru ODBC?
0
 

Author Comment

by:martinre
ID: 6881095
yes I can but it is taking a long time to load the Oracle table.  I am looking for a faster method of loading.

0
 
LVL 9

Expert Comment

by:ornicar
ID: 6881155
I am not sure where the bottleneck is. Is is Access, or is it Oracle: Try to load your Access table into another Access database.

If it is faster, then you will need to drop the indexes on the Oracle table before the upload, and recreate them when finished. This is what is usually done. Also, if the table is large, you could tune your oracle.ini file, increasing LARGE_POOL_SIZE and mostly SHARED_POOL_SIZE. (I personally doubled the default values)

If it is not faster, Access is the bottleneck and all you can try is compacting the database, or optimizing the query. Can you paste the SQL here?

0
 
LVL 54

Accepted Solution

by:
nico5038 earned 50 total points
ID: 6881203
This would involve the "dynamic" generation of INSERT statements with filled fields where the INSERT statement's syntax is as under Oracle.

I would create a function for this to read the access table "cursored" row by row and place that in the passthrough query like:

dim qd as querydef
dim rs as recordset

set qd = currentdb.querydefs("your passthrough query")
set rs = currentdb.openrecordset("your access table")

WHILE not rs.eof
 strSQL = "INSERT INTO yourOracleTableName field1, field2 VALUES (" & rs!field1 & "," & rs!field2 & ");"
 td.SQL = strSQL
 currentdb.execute ("your passthrough query")
 rs.movenext
WEND


It's air-code, but I guess you get the idea.

Nic;o)


0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question