Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 19th, 2003, 10:04 PM
Registered User
 
Join Date: Nov 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Appending Records from One table to another

I thank those who responded to my question of appending records from one table in a database to another table in another database. The code is in VB6 using Access2000 as the database.
I am having problem of the system not able to recognise the second table. I know I am not representing the second table/database well.
Here is my code:

Dim mydb1 as database
dim mydb2 as database
.
.
set mydb1=workspaces(0).Opendatabase(mydata1.mdb) ' contains table1
set mydb2=workspaces(0).Opendatabase(mydata2.mdb) ' contains table2
.
.
mydb1.execute "INSERT INTO table1 select * FROM ...."

The system recognises table1 but what do I write after FROM for the system to recognise table2 that is in mydb2.

May be my coding is not correct. Please help me.

-Tallon



 
Old November 20th, 2003, 03:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

I think the missing syntax is "table2 in <<path>>\mydata2.mdb"





Similar Threads
Thread Thread Starter Forum Replies Last Post
Appending Records from One table to another Tallon Wolle Pro VB 6 4 September 9th, 2008 11:29 AM
Appending a Table to a Catalog using ADOX ShoeBucket Access VBA 3 June 15th, 2007 01:58 PM
copy and append records from table-A to table B bhunter Access 6 March 9th, 2004 02:02 PM
appending a field to a table Dmouse Access ASP 1 February 29th, 2004 05:18 AM
thousands records enter one table to another table mateenmohd SQL Server 2000 3 July 17th, 2003 07:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.