|
 |
asp_databases thread: RE: I cant move backword thru the records
Message #1 by "Varghese, Biju (ZB4214)" <Biju.Varghese@p...> on Fri, 12 Jul 2002 12:49:30 -0700
|
|
Change the recrodset's CursorLocation and CursorType properties to use
client side cursors and static.
-Biju
-----Original Message-----
From: Shabbir [mailto:jamali_s@y...]
Sent: Friday, July 12, 2002 10:37 AM
To: ASP Databases
Subject: [asp_databases] I cant move backword thru the records
My name is shabbir and i am a learning ASP . i have a problem with my
code..
my aim of this code is i want to find a record in my recordset using find
mthod. now the problem is that it says that i cannot move to the record
in backward directiona dn it displays the following message on the browser
i would be really obliged ifyou could help me inthis regard
my code is
<% @language="vbscript" %>
</HEAD>
<BODY>
<%
dim rec_set,conn,search_var,str
set conn=server.createobject("adodb.connection")
set rec_set=server.createobject("adodb.recordset")
search_var=request.form("dir")
conn.open "dsn=shabs"
rec_set.open "movie",conn,0,1,2
str= "director='" & search_var &"'"
rec_set.find str '********the error is in this line
if rec_set.eof then
response.write "there is no record"
else
response.write rec_set("movid") & "<BR>" & rec_set("title") &rec_set
("director")
end if
rec_set.close
set rec_set=nothing
%>
</BODY>
</HTML>
thanking you
shabbir hussain
Message #2 by "Shabbir" <jamali_s@y...> on Fri, 12 Jul 2002 19:31:45
|
|
thanks friend for your help
i think this was the problem .. but then what makes you feel that this is
the answer
thanking you
shabbir jamali
> Looks like you are not using correct cursor and lock type.
c> hange your recordset line as follows:
-> ------------------------------------
r> ec_set.open "movie",conn,1,3,2
-> -----------------------------------
>
Message #3 by "Roy, Siddarth S" <sroy@b...> on Fri, 12 Jul 2002 13:09:44 -0400
|
|
did u try including the adovbs.inc file
or try the bookmark function
if u can t move backwards then open the cursor in the manner u require
it
HTH
Sid
-----Original Message-----
From: Shabbir [mailto:jamali_s@y...]
Sent: Friday, July 12, 2002 1:37 PM
To: ASP Databases
Subject: [asp_databases] I cant move backword thru the records
My name is shabbir and i am a learning ASP . i have a problem with my
code..
my aim of this code is i want to find a record in my recordset using
find
mthod. now the problem is that it says that i cannot move to the record
in backward directiona dn it displays the following message on the
browser
i would be really obliged ifyou could help me inthis regard
my code is
<% @language=3D"vbscript" %>
</HEAD>
<BODY>
<%
dim rec_set,conn,search_var,str
set conn=3Dserver.createobject("adodb.connection")
set rec_set=3Dserver.createobject("adodb.recordset")
search_var=3Drequest.form("dir")
conn.open "dsn=3Dshabs"
rec_set.open "movie",conn,0,1,2
str=3D "director=3D'" & search_var &"'"
rec_set.find str '********the error is in this line
if rec_set.eof then
response.write "there is no record"
else
response.write rec_set("movid") & "<BR>" & rec_set("title") &rec_set
("director")
end if
rec_set.close
set rec_set=3Dnothing
%>
</BODY>
</HTML>
thanking you
shabbir hussain
Message #4 by "Chirag Shah" <chiragiit@y...> on Fri, 12 Jul 2002 17:59:52
|
|
Try this let me know if you still having any problem
------------------------------------------------------------
<% @language="vbscript" %>
</HEAD>
<BODY>
<%
dim rec_set,conn,search_var,str
set conn=server.createobject("adodb.connection")
set rec_set=server.createobject("adodb.recordset")
search_var=request.form("dir")
conn.open "dsn=shabs"
rec_set.open "movie",conn,1,3
str= "director='" & search_var &"'"
rec_set.MoveFirst
rec_set.find str
if rec_set.eof then
response.write "there is no record"
else
response.write rec_set("movid") & "<BR>" & rec_set("title") &rec_set
("director")
end if
rec_set.close
set rec_set=nothing
%>
</BODY>
</HTML>
--------------------------------------------------------------------
Message #5 by "Shabbir" <jamali_s@y...> on Fri, 12 Jul 2002 17:37:26
|
|
My name is shabbir and i am a learning ASP . i have a problem with my
code..
my aim of this code is i want to find a record in my recordset using find
mthod. now the problem is that it says that i cannot move to the record
in backward directiona dn it displays the following message on the browser
i would be really obliged ifyou could help me inthis regard
my code is
<% @language="vbscript" %>
</HEAD>
<BODY>
<%
dim rec_set,conn,search_var,str
set conn=server.createobject("adodb.connection")
set rec_set=server.createobject("adodb.recordset")
search_var=request.form("dir")
conn.open "dsn=shabs"
rec_set.open "movie",conn,0,1,2
str= "director='" & search_var &"'"
rec_set.find str '********the error is in this line
if rec_set.eof then
response.write "there is no record"
else
response.write rec_set("movid") & "<BR>" & rec_set("title") &rec_set
("director")
end if
rec_set.close
set rec_set=nothing
%>
</BODY>
</HTML>
thanking you
shabbir hussain
Message #6 by "Chirag Shah" <chiragiit@y...> on Fri, 12 Jul 2002 17:51:02
|
|
Looks like you are not using correct cursor and lock type.
change your recordset line as follows:
-------------------------------------
rec_set.open "movie",conn,1,3,2
------------------------------------
|
|
 |