UNKNOWN '************************************** ' Name: how tofetch record using connect ' ion.execute method ' Description:this code explain how to u ' se connection.execute to fetch record fr ' om table. ' By: welcome007 ' ' ' Inputs:None ' ' Returns:return no of records or check ' records ' 'Assumes:None ' 'Side Effects:None 'This code is copyrighted and has limite ' d warranties. 'Please see http://www.PlanetSourceCode. ' com/xq/ASP/txtCodeId.72962/lngWId.1/qx/v ' b/scripts/ShowCode.htm 'for details. '************************************** <%@ Language="VbScript"%> <% Option Explicit %> <% dim con,rs,sql set con = Server.CreateObject("Adodb.Connection") set rs = Server.CreateObject("Adodb.Recordset") 'after opening connection how to fetch r ' ecords from table sql ="select * from usertable where username = '" & trim(Request.form("txtusername")) & "' " set rs = con.execute(sql) if not rs.eof then Response.write("Record exist") else Response.write("No Record Fount") end if set rs = nothing set con = nothing %>