Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding/Editing a record in a new recordset
Message
De
21/09/1999 09:39:52
 
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00266094
Message ID:
00267057
Vues:
24
>To create a recordset with the one record you want to add, simply create a recordset with an impossible condition "SELECT * FROM TableA WHERE Field = 'ImpossibleCondition'". After this, use the AddNew Method on this recordset. This way your recordset will only contain the one record you just added.

I had a feeling this would be the answer. I was hoping there might be a better way that I overlooked.

>
>BTW, if you use this technique, you are surely in bound mode. If not, why do you create a recordset? You could simply use an INSERT SQL statement to append to your database (with the EXECUTE method of the Connection object). This is the way you will get most performance.

I am in bound mode, although I have been thinking of changing that. It's nice for rapid development, but I'm thinking that performance may be an issue because of the way I have to do some of this.

Thanks,
-Mike
--------------------------
Michael Koepke, Consultant
Nims Associates, Inc.
mkkoepke@aol.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform