?
Solved

Load Oracle tbl using pass through query

Posted on 2002-03-19
4
Medium Priority
?
441 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 200 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

752 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