Updating a recordset

Rated 4.60/5 based on 624 customer reviews

'this is with sql update statement dim some Var as string, another Var as String, cn As New ADODB. The latter strategy is a RBAR (Row By Agonizing Row) approach.Connection some Var = "some Var" another Var = "another Var" sql S = "Update table Of Rec set columna = " &_ some Var & ", colunmb = " & another Var &_ " where columnc = 20"; cn. The first strategy, executing a single (valid) , is a "set-based" approach.table, and the process repeats through a loop until all 10 IDs are now in 10 rows each to fill the 100 rows of data in the Clients table. Move Next Loop Msg Box "Finished Looping" rst Sales Rep.I went about it by creating two recordsets and trying a loop through SQL Update. Close End Sub I hate to be the one to tell you this, but you should reconsider using SQL to do this update.This works even when the query returns records from more than one table.

Fields ' If the column is named Title If fld Enumerator.

This page summarizes how to create and use DAO recordsets.

In the following sections these different approaches are shown.

You wouldnt expect to edit that since you are not viewing individual records.

However, if any portion of your query contains a summary (GROUP BY) field, all the fields of the returned records are not editable (not just the summary fields).

Leave a Reply