Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Inserting into Access table from ADO Rset or Cmd from Oracle
Jason,
I take it back. You do not NEED an access macro, but you need to call some access functions from VB.
dim myaccess as object
set myaccess = createobject("Access.Application")
myaccess.visible = true ' or false if you prefer
myaccess.opencurrentdatabase "c:\myfilename.mdb"
' The following command automates access imports. You will need a
connection string or ODBC data source to
' use it. I recommend the ODBC data source if you are doing this on only a
few machines
myaccess.currentdb.docmd.transferdatabase( you will have to look this one up
in access help)
myaccess.CloseCurrentDatabase
myaccess.quit
set myaccess = nothing
In the transferdatabase call above, I believe that you can throw in a SQL statement as a data source.
Give it a try,
Rob
jason <jfielding_at_trinitech.co.uk> wrote in message
news:88qvqs$4qh$1_at_trinitech.demon.co.uk...
> I've never used Macros, would I be able to execute the macro from VB at
> run-time ?; and, can this be done without linking the Oracle View into
> Access ?
> Jason
>
> Rob DeMarco wrote in message
> <4Zor4.17935$Zp1.587212_at_newsread1.prod.itd.earthlink.net>...
> >Jason,
> >
> >Skip the middle man. Set up an Access 97 macro that
> >will import the view's records from an ODBC
> >data source (namely your oracle db) into a blank table.
> >You will be hard pressed to find a way to use ADO for such a bulk
> operation.
> >
> >Rob
> >
> >jason <jfielding_at_trinitech.co.uk> wrote in message
> >news:88jn31$ilq$1_at_trinitech.demon.co.uk...
> >> Hi,
> >> I'm using VB6, Access 97 and Oralce 8.04.
> >> Can anyone tell me 1) If it's possible .... and 2) a hint on how .....
> >> .......to retrieve data from an Oracle View using either an ADO
> >> Recordset or ADO Command (can do that bit) - but then insert
> >> this data straight into an empty Access table - without looping
> >> through the retrieved data record by record ?
> >>
> >> Any pointers would be really appreciated.
> >> TIA
> >> Jason
> >>
> >>
> >
> >
>
>
>
Received on Mon Feb 21 2000 - 20:52:16 CST