p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: RE: proasp_codeclinic digest: March 09, 2001


Message #1 by Ian Barker <Ian.Barker@b...> on Mon, 12 Mar 2001 09:12:52 -0000
It's defaulted to adForwardOnly

On Saturday, March 10, 2001 8:04 AM, Code Clinic digest [SMTP:proasp_codeclinic@p...] wrote:
> PROASP_CODECLINIC Digest for Friday, March 09, 2001.
> 
> 1. Problems using objRS.MovePrevious
> 
> ----------------------------------------------------------------------
> 
> Subject: Problems using objRS.MovePrevious
> From: thekman@w...
> Date: Fri, 9 Mar 2001 22:54:44
> X-Message-Number: 1
> 
> For some reason, I'm not able to use the .moveprevious command in this 
> connection string. I'm not too familiar with this sort of connection(OLE, 
> OLEDB, I get them confused. :)
> Anyway...if someone could please help me fix this bit of code so I can use 
> the .moveprevious command, I'd really appreciate it. Thanks!
> 
> <%
> uploadID = Request.Querystring("uploadID")
> 
> myDSN = "DSN=Upload;uid=AspConnect;password=aspconn"
> 	set connRE = Server.CreateObject ("ADODB.Connection")
> 	set objRS = Server.CreateObject ("ADODB.Recordset")
> 	connRE.Open myDSN
> 
> strSQL = "Select * from textUpload where uploadID='" & uploadID & "'"
> objRS.Open strSQL, connRE
> 
> title = objRS("title")
> briefDesc = objRS("briefDesc")
> fullStory = objRS("fullStory")
> posterName = objRS("userName")
> uploadDate = objRS("todayDate")
> 
> objRS.MoveNext
> If objRS.EOF Then
> 	nextStory = "Nil"
> End if
> If not objRS.EOF Then
> 	nextStory = objRS("uploadID")
> End If
> 
> objRS.MovePrevious
> objRS.MovePrevious
> 
> If objRS.BOF Then
> 	previousStory = "Nil"
> End If
> If Not objRS.BOF Then
> 	previousStory = objRS("uploadID")
> End If
> %>
> 

  Return to Index