Click to See Complete Forum and Search --> : select from sql and updae the db


pelegk1
10-01-2003, 06:15 AM
i have made a select on a table
"select * from tblData"

and i want when i go over the fields that :
if rs("field1")="1" then
update field2=1 ' *
end if

how do i do (*)?
thnaks in advance
peleg

Ribeyed
10-01-2003, 02:15 PM
what are you trying to do?

rdoekes
10-02-2003, 10:50 AM
I am not sure what you are trying to do, but if you just want to do a database update from a selected number of records, you do not need the overhead of a recordset, but you can just do this with sql:

UPDATE tblData
SET field2 = field1
WHERE field1 = 1

If you make the 1 a variable, you can even do this for other values.

Hope this helps,

-Rogier Doekes