
help: vb 6.0 / ado code to copy a table from one mdb to another
As far as I know you'll have to use one connection to do this. This
should work:
Dim cnnTarget As New ADODB.Connection
Dim strCommand As String
Dim lngRecords as long
cnnTarget.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _
& "C:\path\TargetDB.mdb"
cnnTarget.Open
strCommand = "SELECT * INTO [NewTableName] " _
& "FROM [SourceTableName] IN "C:\path\SourceDB.mdb"
cnnSource.Execute strCommand, lngRecords
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!