Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB + Multiple Access Databases = Nightmare?
Message
De
24/07/2001 13:09:55
Jason Dalio
Northern Interior Regional Health Board
Prince George, Colombie Britannique, Canada
 
 
À
24/07/2001 10:35:54
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00533754
Message ID:
00534511
Vues:
11
Efficeincy is funny that way. I'm going to mention the way that I would do what you are trying to accomplish and then maybe someone will chime in and tell us both if their is a better way.

1st Example: (modification of the first code I sent you)
rst1.open "SELECT tbl1.ID, tbl1.SomeField FROM tbl1;"
with rst1
do wile not .eof
conConnection.execute "INSERT INTO tbl2 (tbl2.ID, tbl2.DataField) VALUES " _
& "(" & rst1("tbl1.ID") & ", '" & rst1("tbl1.SomeField") & "');"
.movenext
loop
end with
rst1.close
set rst1 = nothing

So you can see they we just open the first recordset, move through it one by one and each time issues an INSERT into our second recordset (note the conConnection is an ADODB.Connection object that points at the database containing the tables you want to export to).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform