megetron
May 11th, 2004, 06:55 AM
Hi, here are the code that works for me just fine:
strSQL = "SELECT * FROM canyon WHERE id=" & can_id
rsUpdateEntry.CursorType = 2
rsUpdateEntry.LockType = 3
rsUpdateEntry.Open strSQL, adoCon
rsUpdateEntry.Fields("city_id") = city_id
rsUpdateEntry.Update
rsUpdateEntry.Close
now, i need something generic to update more than one field.
i have a variable and i am trying to update but this not works:
dim value
value = "city_id"
rsUpdateEntry.Fields(value) = "stam text"
an error occured: "mismatch type."
what did i do wrong?
strSQL = "SELECT * FROM canyon WHERE id=" & can_id
rsUpdateEntry.CursorType = 2
rsUpdateEntry.LockType = 3
rsUpdateEntry.Open strSQL, adoCon
rsUpdateEntry.Fields("city_id") = city_id
rsUpdateEntry.Update
rsUpdateEntry.Close
now, i need something generic to update more than one field.
i have a variable and i am trying to update but this not works:
dim value
value = "city_id"
rsUpdateEntry.Fields(value) = "stam text"
an error occured: "mismatch type."
what did i do wrong?