Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saving a table to disk
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00488370
Message ID:
00488400
Vues:
8
>Can I just create an ADO recordset from the table in the access database, disconnect and save it to the project folder, then reopen it as needed? It would never need to be reconnected once saved. Is there a better way to handle it?

To save an ADO recordset, use «rstData.Save PathFileName». To reopen it, use «rstdata.open PathFileName».


>Also, anyone know how to create an ADO rs on fly, just to hold some data in my app to sort and then discard?

Use this syntax:
Dim rstX as adodb.recordset
set rstX = new adodb.recordset
with rstx
   .cursorlocation=aduseclient
   .cursortype=adopenstatic
   .locktype=adlockbatchoptimistic
   .fields.append "Field1",adInteger
   .fields.append "Field2", adchar, 20
   .open
end with
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform