|
-
Jul 11th, 2005, 05:10 AM
#1
Thread Starter
Frenzied Member
Re: copy table from a database to annother
hi:
The paths are:
source path - c:\program files\exp\new.mdb
destination Path - c:\program files\dali\news.mdb
Table with all records to copy from the source path - india
table for destination path - india
note:The databases are equals...they have the same tables,everything is equal...the diference is the path!
Thanks
-
Jul 11th, 2005, 08:34 PM
#2
Re: copy table from a database to annother
Try this...
VB Code:
'reference microsoft ActiveX Data Objects
Dim adoConnection As ADODB.Connection
Set adoConnection = New ADODB.Connection
adoConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\program files\exp\new.mdb"
adoConnection.Execute "INSERT INTO india [IN 'c:\program files\dali\news.mdb'] SELECT india.* FROM india"
-
Jul 12th, 2005, 02:15 PM
#3
Thread Starter
Frenzied Member
Re: copy table from a database to annother
hi:
thanks for your reply!
I have convert the code for my reality and I got this error:
Run time error '3134'
Syntax error in INSERT INTO statement
Code:
Dim db As Database
Set db = Workspaces(0).OpenDatabase("c:\program files\exp\new.mdb")
db.Execute "INSERT INTO india [IN 'c:\program files\dali\news.mdb'] SELECT india.* FROM india"
3
Thanks
-
Jul 13th, 2005, 01:53 AM
#4
Re: copy table from a database to annother
This should work...
VB Code:
Dim db As Database
Set db = Workspaces(0).OpenDatabase("c:\program files\exp\new.mdb")
db.Execute "INSERT INTO india IN 'c:\program files\dali\news.mdb' SELECT india.* FROM india"
-
Jul 13th, 2005, 01:24 PM
#5
Thread Starter
Frenzied Member
Re: copy table from a database to annother
thanks for your help...now the code work very well
-
Jul 13th, 2005, 11:00 PM
#6
Re: copy table from a database to annother[RESOLVED]
Glad it worked now!
-
Sep 4th, 2005, 01:20 PM
#7
Frenzied Member
Re: copy table from a database to annother
 Originally Posted by dee-u
This should work...
VB Code:
Dim db As Database
Set db = Workspaces(0).OpenDatabase("c:\program files\exp\new.mdb")
db.Execute "INSERT INTO india IN 'c:\program files\dali\news.mdb' SELECT india.* FROM india"
Dee-u do you have any idea what the syntax would be when both databases are password protected?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|