&nbsp;<BR>I have a table with 2 columns.<BR>and i have dictionary object with same 2 columns.<BR><BR>I am reading dicionary items and i want to update the table <BR>if the column with that value is existing or else i want to add new record<BR>what is optimum method to do this.<BR><BR>my code is like this.Is there any method effiecient than this?<BR> <BR>cnnconnection.begintrans<BR>set tempstats = session("clickevents")<BR>tempitems = tempstats.items<BR>tempkeys = tempstats.keys<BR><BR>orssql1 = "select * from today_page_hits"<BR><BR>set orssql = server.createobject("adodb.recordset")<BR>&#039ors sql.open orssql1,cnnconnection,adopenstatic,adlockpessimist ic,adcmdtext<BR>orssql.open "today_page_hits",cnnconnection,1,2,2<BR><BR>f or i = 0 to ubound(tempkeys)<BR>count = tempitems(i)<BR>pagename = tempkeys(i)<BR><BR> orssql.find "page_name = &#039"&pagename&"&#039"<BR> if orssql.eof then<BR> orssql.addnew<BR> orssql("page_name") = pagename<BR> orssql("no_of_hits") = count <BR> else<BR> orssql("no_of_hits") = count + orssql("no_of_hits")<BR> end if<BR> orssql.movefirst<BR>Next<BR><BR>orssql.updatebatch <BR>cnnconnection.committrans <BR>