i'll just put the Code first, and ask my question later.
Code:
Dim AuthID
AuthID = Topic.Fields.Item("Autnm").Value
.
.
.
<%=(Author_Names_From_ID.Fields(AuthID).Item("Author_Hebrew").Value)%>
Autnm is numbers, 1-20.
AuthID is suposed to take this number.
Than it should print from
Author_Hebrew in field
AuthID
but it says:
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
Seems it points wrong on the field... any idea?
if u need the whole code its just 100 lines... well i'll post it here any ways:
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="28598"%>
<!--#include file="Connections/KerenDB.asp" -->
<%
Dim Topic__MMColParam
Topic__MMColParam = "1"
If (Request.QueryString("Topic") <> "") Then
Topic__MMColParam = Request.QueryString("Topic")
End If
%>
<%
Dim Topic
Dim Topic_numRows
Set Topic = Server.CreateObject("ADODB.Recordset")
Topic.ActiveConnection = MM_KerenDB_STRING
Topic.Source = "SELECT Bknm_Hebrew, Bknm_English, Autnm, Note, ISBN, Pages, Size, Cover, Topic, PUSD, PNIS, PEUR, PLS, Lang FROM Library,Author WHERE Topic = '" + Replace(Topic__MMColParam, "'", "''") + "' ORDER BY Bknm_Hebrew ASC"
Topic.CursorType = 0
Topic.CursorLocation = 2
Topic.LockType = 1
Topic.Open()
Topic_numRows = 0
%>
<%
Dim Autnm_hebrew
Dim Autnm_English
Autnm_ID = Topic.Fields.Item("Autnm").Value
%>
<%
Dim Author_Names_From_ID
Dim Author_Names_From_ID_numRows
Set Author_Names_From_ID = Server.CreateObject("ADODB.Recordset")
Author_Names_From_ID.ActiveConnection = MM_KerenDB_STRING
Author_Names_From_ID.Source = "SELECT ID, Author_English, Author_hebrew FROM Author ORDER BY ID ASC"
Author_Names_From_ID.CursorType = 0
Author_Names_From_ID.CursorLocation = 2
Author_Names_From_ID.LockType = 1
Author_Names_From_ID.Open()
Author_Names_From_ID_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 10
Repeat1__index = 0
Topic_numRows = Topic_numRows + Repeat1__numRows
%>
<%
Dim Repeat2__numRows
Dim Repeat2__index
Repeat2__numRows = -1
Repeat2__index = 0
Topic_numRows = Topic_numRows + Repeat2__numRows
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;" />
<title>Keren Ahvah Meshihit</title>
<link href="css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="1" cellpadding="1" cellspacing="1">
<% While ((Repeat1__numRows <> 0) AND (NOT Topic.EOF)) %>
<%
Dim AuthID
AuthID = Topic.Fields.Item("Autnm").Value
%>
<tr>
<td rowspan="3">image</td>
<td colspan="3"><h3>
<%=(Topic.Fields.Item("Bknm_Hebrew").Value)%><br />
<%=(Author_Names_From_ID.Fields(AuthID).Item("Author_Hebrew").Value)%></td>
</tr>
<tr>
<td colspan="3"><h4>
<%=(Topic.Fields.Item("Bknm_English").Value)%><br />
<%=AuthID%>
<%=(Author_Names_From_ID.Fields(AuthID).Item("Author_English").Value)%></td>
</tr>
<tr>
<td colspan="3"><h5>
<%=(Topic.Fields.Item("Note").Value)%></td>
</tr>
<tr>
<td><h6>
<%=(Topic.Fields.Item("Topic").Value)%></td>
<td><h6>
<%=(Topic.Fields.Item("Pages").Value)%></td>
<td><h6>
<%=(Topic.Fields.Item("ISBN").Value)%></td>
<td><h6>
<%=(Topic.Fields.Item("PUSD").Value)%></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Topic.MoveNext()
Wend
%>
</table>
</body>
</html>
<%
Topic.Close()
Set Topic = Nothing
%>
<%
Author_Names_From_ID.Close()
Set Author_Names_From_ID = Nothing
%>