Help regarding ASP srcipts to retrieve data from two different table in the same db

Please support our ASP advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: May 2008
Posts: 48
Reputation: ardeezstyle is an unknown quantity at this point 
Solved Threads: 1
ardeezstyle ardeezstyle is offline Offline
Light Poster

Help regarding ASP srcipts to retrieve data from two different table in the same db

 
0
  #1
Sep 3rd, 2008
Hi everyone!

this is Rupam, I've been building a web application where I need to include a web page where I'll display images from two different tables in a database.

I want to show only two images one from each table at a time, i.e. in one page. What I meant to say is, I'll have a navigation option for the images so that the visitor can navigate through the images. For instance,

Previous | Image from table 1 | Next

Previous | Image from table 2 | Next


So when the visitor clicks Next adjacent to the Image from table 1, he can see the next image in table 1 . Similarly if he clicks the Previous adjacent to the Image from Table 1, he can see the previous image in table 1 and so on.

I've successfully completed this but I am now in a position that if I click the Previous or Next adjacent to Image from table 2 , the page gets refreshed and though I'm able to see the prvious or next image whatever it is but I'm unable to get the same image from the table 1.


Say for instance, the images from table 1 are named as img1tbl1.gif, img2tbl1.gif , img3tbl1.gif........ and the images from table 2 are named as img1tbl2.gif, img2tbl2.gif , img3tbl2.gif........ And I've navigate to img3tbl1.gif and now I want to navigate to img2tbl2.gif. But as soon as I click on Next adjacent to Image from table 2, I reach to img1tbl1.gif as the first image and img2tbl2.gif as the second image.

One more thing that I should mention I've used two forms in the same page.


I hope I'm able to make you all understand my problem . If any more clarifications required please feel free to ask me. I'll highly appreciate your help and guidance..





Rupam Datta
Bangalore
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 154
Reputation: katarey is an unknown quantity at this point 
Solved Threads: 20
katarey's Avatar
katarey katarey is offline Offline
Junior Poster

Re: Help regarding ASP srcipts to retrieve data from two different table in the same

 
0
  #2
Sep 9th, 2008
hi,

you can use AJAX for the same, or you can send the QueryString to the page which will have the id or other tables image,

like yourPage.asp?ID_of_table1Image=2& current_imageID_of_table2=5

post your code here so that we can help you in more detail...

Rahul Dev Katarey
Freelance Web Designer & Developer
Http//www.Katarey.com
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1
Reputation: cj9000 is an unknown quantity at this point 
Solved Threads: 0
cj9000 cj9000 is offline Offline
Newbie Poster

Re: Help regarding ASP srcipts to retrieve data from two different table in the same db

 
0
  #3
Sep 11th, 2008
You might also try storing the results of your database query in a session variable. Then you could call for that variable on the next page.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC