From: Phil Hunt on
You raised a good point, it is a little tricky to cross ref 2 DB. Although
you can do it with linked table, it gets to be as complicated as what you
have now. Forget I said that, unless someone can chime in


"Carl" <nospam(a)all.thanks> wrote in message
news:ORvOYiaLLHA.2276(a)TK2MSFTNGP06.phx.gbl...
> Hi Phil,
> I was wondering about something along those lines...how would that work?
> Can an ADODB recordset be treated as a database table? For example,
>
> INSERT INTO DATABASE1.TABLE1 SELECT * FROM ...
>
> and then what? I don't think you can reference the recordset there, and
> the INSERT statement will not be aware of the MSAccess table, so...
>
> but I am willing to learn; I originally wanted to do it via a bulk insert
> but did not know how to.
>
> Thanks for your time!
> Carl
>
> Phil Hunt wrote:
>> If you are going to re-write, may I suggest using "Insert Into Oracel_DB
>> Select ... from Access" construct. You don't even need the loop and
>> extranaous VB variable. One sql stmt does it all.
>>


From: Paul Clement on
On Tue, 27 Jul 2010 13:08:09 -0400, "Phil Hunt" <aaa(a)aaa.com> wrote:

� You raised a good point, it is a little tricky to cross ref 2 DB. Although
� you can do it with linked table, it gets to be as complicated as what you
� have now. Forget I said that, unless someone can chime in



Yes, can be done if the Oracle table is linked to the Access database:

INSERT INTO LinkedOracleTable (Col1, Col2, Col3) SELECT Col1, Col2, Col3 FROM AccessTable

If it's not linked then the (ODBC) Oracle connection string would need to be provided in the SQL
statement.


Paul
~~~~
Microsoft MVP (Visual Basic)
From: Phil Hunt on
Paul, I am curious what the SQL stmt looks like with connect striing in it .


"Paul Clement" <UseAdddressAtEndofMessage(a)swspectrum.com> wrote in message
news:s56u46dcmt1bo3g9t9u9laqjqbt23t37m6(a)4ax.com...
> On Tue, 27 Jul 2010 13:08:09 -0400, "Phil Hunt" <aaa(a)aaa.com> wrote:
>
> � You raised a good point, it is a little tricky to cross ref 2 DB.
> Although
> � you can do it with linked table, it gets to be as complicated as what
> you
> � have now. Forget I said that, unless someone can chime in
> �
> �
>
> Yes, can be done if the Oracle table is linked to the Access database:
>
> INSERT INTO LinkedOracleTable (Col1, Col2, Col3) SELECT Col1, Col2, Col3
> FROM AccessTable
>
> If it's not linked then the (ODBC) Oracle connection string would need to
> be provided in the SQL
> statement.
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)


From: Paul Clement on
On Tue, 27 Jul 2010 14:24:08 -0400, "Phil Hunt" <aaa(a)aaa.com> wrote:

� Paul, I am curious what the SQL stmt looks like with connect striing in it .


I'll see if I can come up with something functional.


Paul
~~~~
Microsoft MVP (Visual Basic)
From: Kevin Provance on

"Paul Clement" <UseAdddressAtEndofMessage(a)swspectrum.com> wrote in message
news:6ldu46tllij1ftuusdnimulmsiopk0miqp(a)4ax.com...
: On Tue, 27 Jul 2010 14:24:08 -0400, "Phil Hunt" <aaa(a)aaa.com> wrote:
:
: � Paul, I am curious what the SQL stmt looks like with connect striing in
it .
: �
:
: I'll see if I can come up with something functional.

Didn't someone post a site that dealt with connection strings? Damn, I
should have bookedmarked it.