Creating a new variable from a previous recordset

I hope you can help.

I need to create a new variable from a previous recort set i have created. I’m using dreamweaver, so my hand coding isn’t great.

Let me explain,

I’m using a URl query to get one record at a time.

[COLOR=blue]<%
var rs_article = Server.CreateObject(“ADODB.Recordset”);
rs_article.ActiveConnection = MM_SHN_STRING;
rs_article.Source = "SELECT * FROM ARTICLE, PRI_THEME, CREATOR, MATERIAL, ITEM_LOC WHERE ARTICLE_ID = “+ rs_article__MMColParam.replace(/’/g, “’’”) + " AND ARTICLE.PRIMARY_THEME_ID = PRI_THEME.PRIMARY_THEME_ID AND ARTICLE.CREATOR_ID = CREATOR.CREATOR_ID AND ARTICLE.MATERIAL_ID = MATERIAL.MATERIAL_ID AND ARTICLE.ITEM_LOCATION_ID = ITEM_LOC.ITEM_LOCATION_ID”;
rs_article.CursorType = 0;
rs_article.CursorLocation = 2;
rs_article.LockType = 1;
rs_article.Open();
var rs_article_numRows = 0;
%>[/COLOR]

I need to creat a new variable that gives the value of CREATOR_ID. This will then be used as a session variable to create another recordset.

[COLOR=darkred]
<%
var rs_related__MMColParam = “1”;
if (String(Application(“stheme”)) != “undefined” &&
String(Application(“stheme”)) != “”) {
rs_related__MMColParam = String(Application(“stheme”));
}
%>
<%
var rs_related = Server.CreateObject(“ADODB.Recordset”);
rs_related.ActiveConnection = MM_SHN_STRING;
rs_related.Source = "SELECT ARTICLE_ID, DC_IDENTIFIER_URI, DC_TITLE_EN, PRIMARY_THEME_ID, SUB_THEME_ID FROM ARTICLE WHERE SUB_THEME_ID = "+ rs_related__MMColParam.replace(/’/g, “’’”) + “”;
rs_related.CursorType = 0;
rs_related.CursorLocation = 2;
rs_related.LockType = 1;
rs_related.Open();
var rs_related_numRows = 0;
%>[/COLOR]

Where stheme is the name of the new variable created.

I’m sure this is basic stuff, but it’s not my field…

Please let me know if you need further explanation.

Thanks,

Capt.