Solved

insert from msaccess table into unlinked oracle table

Posted on 2014-02-24
2
312 Views
Last Modified: 2014-02-28
In msaccess I have to insert into an unlinked Oracle table. something like this:

insert into  [ODBC;UID=TOM;PWD=TOM_PWD;DSN=ORCLD;].T1 select [Field1] from [Table1];

where T1 is an Oracle table in TOM/TOM_PWD@ORCLD.
Table1 is an msaccess table.
note T1 must not be a linked table

Thanks
0
Comment
Question by:graham-n
[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
2 Comments
 
LVL 22

Expert Comment

by:Kelvin Sparks
ID: 39884812
You'll need to use ADODB for this, create a connection, write the insert string and execute it.

Kelvin
0
 
LVL 22

Accepted Solution

by:
Kelvin Sparks earned 210 total points
ID: 39884824
It would be along the lines of

Dim cnn As ADODB.Connection
Dim cmd As New ADODB.Command


Set cnn = New ADODB.Connection
cnn.ConnectionString = sConnect
cnn.Open

Set cmd = New ADODB.Command

    With cmd
        .ActiveConnection = cnn
        .CommandText = strSP
        .CommandType = adCmdText
        .CommandTimeout = 0
        .Execute
    End With
Set cmd = Nothing
Set cnn = Nothing

Where sCoonect is your connections string and strSP is the actual INSERT INTO table..... statement you want executed (in Oracle syntax)

Kelvin
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

636 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