Copying tables within an Access Database 
Author Message
 Copying tables within an Access Database

Hi, all!! Using VB6 SP5 to access tables in an Access 2000/2002 database
with ADO...

How does one go about copying a table within an Access database?  I don't
want to duplicate the entire database, just made a copy of a table WITHIN
the same database...

Thanks much!
Jack



Sat, 14 May 2005 10:17:08 GMT  
 Copying tables within an Access Database
Additionally, using the SELECT INTO method isn't an option, because all
indexes, primary keys, etc are lost in the move.  I need to duplicate a
table AS-IS within a single database...

Jack


Quote:
> Hi, all!! Using VB6 SP5 to access tables in an Access 2000/2002 database
> with ADO...

> How does one go about copying a table within an Access database?  I don't
> want to duplicate the entire database, just made a copy of a table WITHIN
> the same database...

> Thanks much!
> Jack



Sat, 14 May 2005 10:36:16 GMT  
 Copying tables within an Access Database
I believe you can use the DoCmd object's TransferDatabase function.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2...
l/acmthactTransferDatabase.asp

Joe


Quote:
> Additionally, using the SELECT INTO method isn't an option, because all
> indexes, primary keys, etc are lost in the move.  I need to duplicate a
> table AS-IS within a single database...

> Jack



> > Hi, all!! Using VB6 SP5 to access tables in an Access 2000/2002 database
> > with ADO...

> > How does one go about copying a table within an Access database?  I
don't
> > want to duplicate the entire database, just made a copy of a table
WITHIN
> > the same database...

> > Thanks much!
> > Jack



Sat, 14 May 2005 11:07:01 GMT  
 Copying tables within an Access Database
What are the dependencies for using this?  Presumably Office, or Access
2000/2002 must be installed??  This app is running from VB, and I can't
require the users to have Office installed on their boxes...

Jack


Quote:
> I believe you can use the DoCmd object's TransferDatabase function.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2...
Quote:
> l/acmthactTransferDatabase.asp

> Joe



> > Additionally, using the SELECT INTO method isn't an option, because all
> > indexes, primary keys, etc are lost in the move.  I need to duplicate a
> > table AS-IS within a single database...

> > Jack



> > > Hi, all!! Using VB6 SP5 to access tables in an Access 2000/2002
database
> > > with ADO...

> > > How does one go about copying a table within an Access database?  I
> don't
> > > want to duplicate the entire database, just made a copy of a table
> WITHIN
> > > the same database...

> > > Thanks much!
> > > Jack



Sat, 14 May 2005 12:34:06 GMT  
 Copying tables within an Access Database

Additionally, using the SELECT INTO method isn't an option, because all
indexes, primary keys, etc are lost in the move.  I need to duplicate a
table AS-IS within a single database...

I'm not aware of any way to do this without using Access automation, or DAO, ADOX, or SQL DDL to (at
a minimum) create the indexes:

HOWTO: Create a Table with Primary Key Through ADOX
http://support.microsoft.com/default.aspx?scid=KB;en-us;q252908


Microsoft MVP (Visual Basic)



Sat, 14 May 2005 21:36:40 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. MS Access DB - Copy Table A from Database A to Table A Database B

2. Copying Tables within a database

3. Testing for the presence of a table within an Access database

4. Testing for the presence of a table within an Access database in VB5

5. Copying the structure of one Access table to a new Access table

6. To Copy table from one Access database to other

7. Help:copying an ODBC database table to Access from VB

8. DAO copy tables between two Access databases

9. How to Copy table in Access database via vbscript

10. Help:copying an ODBC database table to Access from VB

11. ADO Copy Tables from One Database to Another (Access 97)

12. HELP: Need help in creating a table from a table within Access

 

 
Powered by phpBB® Forum Software