Solved

Load Oracle tbl using pass through query

Posted on 2002-03-19
4
426 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
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

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…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

776 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