Forums

ASP

This topic is locked

How do I get the correct recordset?

Posted 14 Jun 2006 15:33:30
1
has voted
14 Jun 2006 15:33:30 Kristian Sundström posted:
This problem is a little bit difficult to describe, but I will do my best:

I have a database table called "tbl_activity" in which all publications of my institute is collected. The primary key is "activity_id", and there are also columns for describing if a specific publication has aq press release connected to it ("press" and the title ("press_title" and contents ("peress contents" of this press release.

At the web I have one master page, where all press releases are shown, and if you click on one, you come to a details page, where that specific press release you have chosen is written out in full. This press release is filtered out by using the querystring value of "activity_id", so that when you come to the details page, the address might be for example "press_detail.asp?activity_id=12". Thus far no problems.

However, at the bottom of the page a want a link to the publication, to which the specific press release is connected. Since I have the "activity_id" in the querystring, this poses no problem if there is only one publication connected to a specific press release. But in some cases I have 2 or even 3 publications, which are connected to the same press release (i e one press release describes the results of several publications).

So what I need to do is to create a new recordset with all these publications, and where the only information I have initially is the activity_id. Ok, so my idea was to compare the column "press_title" of the unique record I already have by the qurerystring "activity_id" with the same column ("press_title" of all records in the table "tbl_activity", and then to create a new recordset containing all those publications for which the title are the same as for the unique record I get from the querystring.

My simple question is: how on earth do I do that? I tried to insert asp-code as "entered value", but I understand that it will not work (and it did not). Any ideas on how I should filter my recordset?


Replies

Replied 16 Jun 2006 13:25:38
16 Jun 2006 13:25:38 Wim Conix replied:
Kristian,

In case of multiple publications connected to one specific press release, I guess you don't have to make a new recordset at all, but only have to add a "Repeat Region" behavior on the detail fields to be shown. Most easy is to put them together in a table and add the behavior to this. This will make show all records connected to each other or you can define number of records to be shown.

If I understood good what you mean...

Hope this helps,

Wim

Wim Conix
www.image-belle.com
Replied 16 Jun 2006 16:59:36
16 Jun 2006 16:59:36 Javier Castro replied:
Is the relation between articles only the "press_title"?

perhaps there is a way to link the "activity_id", to a hidden query that will look for all the articles that have same title and the result of that
query is displayed in your details page, and those articles are linked to the full articles.

Possible?
uhmm?


Reply to this topic