Copying the contents of a table in one database to another database

Copying the contents of a table in one database to another database

Post by David De Bon » Tue, 28 Jan 2003 21:56:19



Hi.

I want to copy the CONTENTS of a table in one Access 2000 database to
another Access 2000 database.

I have tried this statement:

INSERT INTO SnapshotHeader ( Name ) in 'C:\test.mdb'
SELECT SnapshotHeader.Name
FROM SnapshotHeader;

This works perfect when the database is not password protected. If it is I
get a "Not a valid password" message. I know that the password is correct.

I could also use ADOX if that is possible....I'm using VB 6.

Any suggestions ?

David

 
 
 

Copying the contents of a table in one database to another database

Post by S.Clark[MVP » Wed, 29 Jan 2003 01:15:12


Can you first link the table from dbA to dbB, then query?  This way the db
password will be established already, and you won't have to deal with it.

--
HTH,

Steve Clark, Access MVP
Project Manager
Professional Solutions Group
www.FMSInc.com/Consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Quote:> Hi.

> I want to copy the CONTENTS of a table in one Access 2000 database to
> another Access 2000 database.

> I have tried this statement:

> INSERT INTO SnapshotHeader ( Name ) in 'C:\test.mdb'
> SELECT SnapshotHeader.Name
> FROM SnapshotHeader;

> This works perfect when the database is not password protected. If it is I
> get a "Not a valid password" message. I know that the password is correct.

> I could also use ADOX if that is possible....I'm using VB 6.

> Any suggestions ?

> David


 
 
 

Copying the contents of a table in one database to another database

Post by David De Bon » Wed, 29 Jan 2003 01:37:04


Yes, I have thought about that.

I was just wondering if it could be done directly by SQL...


> Can you first link the table from dbA to dbB, then query?  This way the db
> password will be established already, and you won't have to deal with it.

> --
> HTH,

> Steve Clark, Access MVP
> Project Manager
> Professional Solutions Group
> www.FMSInc.com/Consulting
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-



> > Hi.

> > I want to copy the CONTENTS of a table in one Access 2000 database to
> > another Access 2000 database.

> > I have tried this statement:

> > INSERT INTO SnapshotHeader ( Name ) in 'C:\test.mdb'
> > SELECT SnapshotHeader.Name
> > FROM SnapshotHeader;

> > This works perfect when the database is not password protected. If it is
I
> > get a "Not a valid password" message. I know that the password is
correct.

> > I could also use ADOX if that is possible....I'm using VB 6.

> > Any suggestions ?

> > David