[thelist] TIP: Getting Autonumber Value in Access 97 and lowe r

Scott Dexter sgd at ti3.com
Mon Jun 19 12:01:59 2000


getting autonumber aside, why are we doing this:

> rs.AddNew
> rs!fields = value
> rs.update
> 

??

performance killer, using the recordset to do the updating. Seriously. try
this:

Update WC_Basket set col=value where....
Select max(recid) as RecordID from WC_Basket

you can even throw them in the same db call:

Set oRS = dbConn.Execute "Update WC_Basket set col=value where....;Select
max(recid) as RecordID from WC_Basket"

and then get to the recordid like--

Set oRS = oRS.NextRecordSet
recid = oRS(0)

(just being my ole pedantic performance worried self)
sgd
--
think safely