Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Displaying next record in Access - Please help!

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,963
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Displaying next record in Access - Please help!
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Displaying next record in Access - Please help! - 1/30/2004 10:52:22 AM   
  ProEdge

 

Posts: 1
Score: 0
Joined: 1/30/2004
From:
Status: offline
Hello everyone. I've been pulling my hair with this problem. I recently created an Access database which contains several columns of information. I've created asp files that extract the information from my Access database and place them into my asp file.
However, I've discovered that making asp files for each row (or ID number) is very tedious and can be a pain when it comes to adding something new (such as a new column) because I have to go back and add the new column into each asp file. You can download the code here: http://www.theprodigyedge.com/achem1.zip
I tried copying and pasting the code here but it wouldn't display...probably because the html tage.

But what I'd like for this to do, is when the user clicks next on the page, it takes them to the next row in the data (in this case "ID 2") but still uses this asp outline to display it. That way I don't have to have an asp file for each row. So I'm trying to get the ID to change automatically. I don't know if there is some template that will do this or maybe I need to use some code in VBScript to do this. Since I'm really not good at VBScript, could someone could give me some pointers on what I can do? I'd really appreciate it. Thank you Also if you'd like to view the mdb access file, I've uploaded it to download. Here's the link: http://www.theprodigyedge.com/achem.mdb
 
 
Post #: 1
 
 Re: Displaying next record in Access - Please help! - 1/31/2004 7:59:42 PM   
  ghaneipour

 

Posts: 25
Score: 0
Joined: 9/6/2001
From: Iran
Status: offline
quote:
hello

i down load your data and i`m test it

at next week i answer you
bye



hello to all
ghaneipour
EC OaCa
?CaUi ??N

(in reply to ProEdge)
 
 
Post #: 2
 
 Re: Displaying next record in Access - Please help! - 8/12/2004 6:50:02 AM   
  cperrywebrat

 

Posts: 4
Score: 0
Joined: 8/12/2004
From: USA
Status: offline
C an you post the code you are using so I can get a better idea of what you are trying to accomplish?

(in reply to ProEdge)
 
 
Post #: 3
 
 Re: Displaying next record in Access - Please help! - 8/17/2004 9:51:55 PM   
  Matt

 

Posts: 30
Score: 0
Joined: 8/17/2004
From: United Kingdom
Status: offline
Use the querystring.

The SQL you are useing to grab from the DB is likely to be "Select * from table where id = 1"
Well what I do is this

<%
Dim StrSQL
Dim MyRec
MyRec = Request.querystring("Rec")
MyRec=int(MyRec)
if MyRec = 0 or isnull(MyRec) then MyRec=1
StrSQL = "Select * from [Table name] where id = " & MyRec
...
Your conection method
...
set MyRs = MyConn.execute(StrSQL)
...
The rest is the same apart untill
One thing to note to bypass errors add IF NOT MyRS.EOF before you output.
...
Response.write "<A Href='MyPage.asp?Rec=" & MyRec+1 & "'>Next Page</a>"
%>

(in reply to ProEdge)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Displaying next record in Access - Please help! Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts