is it possible, using VB DAO code to copy a recordset from one mdb to
another, or would I need to use createtabledef/ createfield/ createindex on
the receiving database, and write out each record...
advice gratefully received.
Thanks
advice gratefully received.
Thanks
You can't pass recordsets around database references... the recordset exists because it
was generated from a tabledef (or a mix of them) from *within* the DB. If what you want
to do is to generate a table in MDB2 from a recordset generated in MDB1 you can use an
INSERT INTO SQL query; it enables you to span databases. You can find the necessary info
in the VB help file. However, this method does not replicate indexes or relationships, so
you'll have to do that over the new tabledef once it's generated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Regards,
Klaus H. Probst, MCP
ICQ: 22454937
Quote:> is it possible, using VB DAO code to copy a recordset from one mdb to
> another, or would I need to use createtabledef/ createfield/ createindex on
> the receiving database, and write out each record...
> advice gratefully received.
> Thanks
>advice gratefully received.
>Thanks
1. How to copy entire table from one Access mdb to another mdb by DAO
I want to copy some tables from one Access database to another Access
database. Since DoCmd.Copyobject only works when the Access object library
was installed, I am not sure whether this will work at clients who have not
Access installed at their PC. Therefore I was figuring whether DAO could do
the job by :
set DB2=Opendatabase( .....)
set newTable=DB2.CreateTableDef("myTable")
newTable.Connect=???
newTable.SourceTableName="tblEmployee"
DB2.TableDefs.Append newTable
What should I code after newTable.Connect = ?
Oscar
2. Creating a view with union clause
3. Copying a table from one .mdb to another .mdb
4. Enumerating a column returned by a SELECT statement?
5. Copy a table from a .MDB to other .MDB
6. Help with open cursors monitoring tools
7. VB6 Copy a Ms mdb tbl to another mdb
9. Copy a table from one MDB to another MDB
10. copy tables from mdb to mdb
11. Zipping the mdb file in VB Coding while creating a new mdb file
12. help: vb 6.0 / ado code to copy a table from one mdb to another
13. DAO recordsets in VB from Access .mdb