Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding/Editing a record in a new recordset
Message
From
21/09/1999 09:39:52
 
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00266094
Message ID:
00267057
Views:
25
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform