Creating a copy of an Oracle Table in Access97 via ODBC & VBA 
Author Message
 Creating a copy of an Oracle Table in Access97 via ODBC & VBA

I am stuck trying to create a copy of an Oracle Table in Access 97 via
ODBC and VBA.

If the Oracle table is already linked to Access, it is quite easy in VBA
to create a replica using a query.

Function CreateRepTable() Dim QD1 As QueryDef Dim SQLstr As String
SQLstr = "SELECT PEOPLE.* INTO LocalPEOPLE FROM PEOPLE;" Set QD1 =
CurrentDb.CreateQueryDef("", SQLstr) QD1.Execute End Function

What i'd like to do is create a copy of the Oracle table without having
to have the linked table. I've used the standard code to open the Oracle
Table in VBA using ODBC, and using code based on the CreateRepTable
function above, and I get the following message "runtime error 3078 -
The Microsoft jet database engine cannot find the input table or query
'PEOPLE'. Make sure it exists and is spelt correctly".

Any assistance would be appreciated.

Paul

--
Posted via dBforums, http://www.*-*-*.com/



Sun, 02 Nov 2003 18:11:33 GMT  
 Creating a copy of an Oracle Table in Access97 via ODBC & VBA

Quote:

> I am stuck trying to create a copy of an Oracle Table in Access 97 via
> ODBC and VBA.

> If the Oracle table is already linked to Access, it is quite easy in VBA
> to create a replica using a query.

> Function CreateRepTable() Dim QD1 As QueryDef Dim SQLstr As String
> SQLstr = "SELECT PEOPLE.* INTO LocalPEOPLE FROM PEOPLE;" Set QD1 =
> CurrentDb.CreateQueryDef("", SQLstr) QD1.Execute End Function

> What i'd like to do is create a copy of the Oracle table without having
> to have the linked table. I've used the standard code to open the Oracle
> Table in VBA using ODBC, and using code based on the CreateRepTable
> function above, and I get the following message "runtime error 3078 -
> The Microsoft jet database engine cannot find the input table or query
> 'PEOPLE'. Make sure it exists and is spelt correctly".

> Any assistance would be appreciated.

> Paul

> --
> Posted via dBforums, http://dbforums.com

Why not just use Docmd.TransferDatabase and import the table?

Hope this helps

Tony Oakley



Sun, 02 Nov 2003 18:21:04 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Linking to Oracle tables from Access97 via ODBC

2. *&*&*&* Date math question *&*&*&*

3. Copying an OLE object from an Access table to Word via VBA

4. Problems creating Table in Oracle via ADOX

5. create tables with Odbc in Oracle ?

6. Need help creating Fox 2.5 table via MS Visual FoxPro ODBC driver

7. Oracle ODBC & forms

8. Q&E ODBC, Oracle and bitmaps....

9. Newbie ODBC & Oracle Prob

10. Access & Oracle 7.0 ODBC

11. oracle ODBC & 255 char limit

12. Oracle ODBC & 255 char limit

 

 
Powered by phpBB® Forum Software