Solved

Load Oracle tbl using pass through query

Posted on 2002-03-19
4
416 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
  • 2
4 Comments
 
LVL 9

Expert Comment

by:ornicar
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now