Hi Guys, I try to update a record if exist or create it if not.
Here's my code.
strSQL = "SELECT count(*) FROM Table1 "
Set m_RS = m_DB.Execute(strSQL)
If (m_RS.Fields(0).Value) = 0 then
...insert
else
...update
end if
My question is : is there a way to execute the update query and see if one record has been updated and if not I excecute insert query. I would like to avoid running a query only to get count...
I tried the m_RS.recordcount but no success.
Any help is welcome
thanks
Here's my code.
strSQL = "SELECT count(*) FROM Table1 "
Set m_RS = m_DB.Execute(strSQL)
If (m_RS.Fields(0).Value) = 0 then
...insert
else
...update
end if
My question is : is there a way to execute the update query and see if one record has been updated and if not I excecute insert query. I would like to avoid running a query only to get count...
I tried the m_RS.recordcount but no success.
Any help is welcome
thanks