This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Dreamweaver > August 2005 > Recordset / Go To Detail page issues
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Recordset / Go To Detail page issues
|
|
| Daniel_Cha 2005-08-25, 7:26 pm |
| I have a page that is entirely setup to display based on 3 different
recordsets. They are very simple, The entire page works just displaying the
records.. But as soon as i try to add a 2nd Go To Detail page to the 3rd
Recordset i get the following error:
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record.
/images1.asp, line 362
If i remove the Go to Detail page from that set, the records display fine,
but of course with no hyperlink to the pages...
The #3 recordset is my navigation.....
i have built pages in the past with multiple Go To Detail behaviors and dont
recall having this issue...What am i doing wrong?
Recordset #1
SELECT *
FROM tbStudioCategory
Recordset #2
SELECT *
FROM tbStudioImages
WHERE cat = 'catvar'
Variable is catvar = Request.querystring("cat")
Recordset #3
SELECT cat, catimage
FROM tbStudioCategory
WHERE cat = 'catimg'
Variable is catimg = Request.querystring("cat")
| |
| Daniel_Cha 2005-08-30, 7:38 pm |
| Can anyone help with this its driving me crazy.....
This is what I am getting when I attempt to add the Go To Detail page
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record.
/images1.asp, line 361
Here is line 361 code:
<td nowrap> <strong> <strong><A HREF="/images1.asp?<%=
MM_keepNone & MM_joinChar(MM_keepNone) & "cat=" &
rsImages.Fields.Item("cat").Value
%>"><%=(rsCat.Fields.Item("cat").Value)%></A></strong>
</strong> </td>
What am I missing? Am I doing this in the wrong order? what else can I
check?
"Daniel_Cha" <dan_cha@hotmail.com> wrote in message
news:deksmu$htb$1@forums.macromedia.com...
>I have a page that is entirely setup to display based on 3 different
>recordsets. They are very simple, The entire page works just displaying the
>records.. But as soon as i try to add a 2nd Go To Detail page to the 3rd
>Recordset i get the following error:
> ADODB.Field error '800a0bcd'
> Either BOF or EOF is True, or the current record has been deleted.
> Requested operation requires a current record.
>
> /images1.asp, line 362
>
>
>
> If i remove the Go to Detail page from that set, the records display fine,
> but of course with no hyperlink to the pages...
> The #3 recordset is my navigation.....
> i have built pages in the past with multiple Go To Detail behaviors and
> dont recall having this issue...What am i doing wrong?
>
> Recordset #1
> SELECT *
> FROM tbStudioCategory
>
> Recordset #2
> SELECT *
> FROM tbStudioImages
> WHERE cat = 'catvar'
> Variable is catvar = Request.querystring("cat")
>
> Recordset #3
> SELECT cat, catimage
> FROM tbStudioCategory
> WHERE cat = 'catimg'
> Variable is catimg = Request.querystring("cat")
>
| |
| Les Matthews 2005-08-30, 7:38 pm |
| "Daniel_Cha" <dan_cha@hotmail.com> wrote in message
news:df2ccs$r4s$1@forums.macromedia.com...
> Can anyone help with this its driving me crazy.....
>
> This is what I am getting when I attempt to add the Go To Detail page
> ADODB.Field error '800a0bcd'
> Either BOF or EOF is True, or the current record has been deleted.
> Requested operation requires a current record.
>
> /images1.asp, line 361
>
> Here is line 361 code:
>
> <td nowrap> <strong> <strong><A HREF="/images1.asp?<%=
> MM_keepNone & MM_joinChar(MM_keepNone) & "cat=" &
> rsImages.Fields.Item("cat").Value
> %>"><%=(rsCat.Fields.Item("cat").Value)%></A></strong>
> </strong> </td>
>
> What am I missing? Am I doing this in the wrong order? what else can I
> check?
You are missing <%=(rsCat.Fields.Item("cat").Value)%>. The value is not
there.
You need to supply more code (perhaps the entire page) to obtain more help.
| |
| Daniel_Cha 2005-08-30, 7:38 pm |
| ok, here is the entire page....
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/proofs.asp" -->
<%
Dim rsCat
Dim rsCat_numRows
Set rsCat = Server.CreateObject("ADODB.Recordset")
rsCat.ActiveConnection = MM_proofs_STRING
rsCat.Source = "SELECT cat FROM tbStudioImages GROUP BY cat ORDER BY
cat ASC"
rsCat.CursorType = 0
rsCat.CursorLocation = 2
rsCat.LockType = 1
rsCat.Open()
rsCat_numRows = 0
%>
<%
Dim rsImages__catvar
rsImages__catvar = "1"
If (Request.querystring("cat") <> "") Then
rsImages__catvar = Request.querystring("cat")
End If
%>
<%
Dim rsImages
Dim rsImages_numRows
Set rsImages = Server.CreateObject("ADODB.Recordset")
rsImages.ActiveConnection = MM_proofs_STRING
rsImages.Source = "SELECT * FROM tbStudioImages WHERE cat = '" +
Replace(rsImages__catvar, "'", "''") + "'"
rsImages.CursorType = 0
rsImages.CursorLocation = 2
rsImages.LockType = 1
rsImages.Open()
rsImages_numRows = 0
%>
<%
Dim rsCatImage__catimg
rsCatImage__catimg = "1"
If (request.querystring("cat") <> "") Then
rsCatImage__catimg = request.querystring("cat")
End If
%>
<%
Dim rsCatImage
Dim rsCatImage_numRows
Set rsCatImage = Server.CreateObject("ADODB.Recordset")
rsCatImage.ActiveConnection = MM_proofs_STRING
rsCatImage.Source = "SELECT cat, catimage FROM tbStudioCategory WHERE cat
= '" + Replace(rsCatImage__catimg, "'", "''") + "'"
rsCatImage.CursorType = 0
rsCatImage.CursorLocation = 2
rsCatImage.LockType = 1
rsCatImage.Open()
rsCatImage_numRows = 0
%>
<%
Dim HLooper2__numRows
HLooper2__numRows = -4
Dim HLooper2__index
HLooper2__index = 0
rsImages_numRows = rsImages_numRows + HLooper2__numRows
%>
<%
Dim HLooper1__numRows
HLooper1__numRows = -1
Dim HLooper1__index
HLooper1__index = 0
rsCat_numRows = rsCat_numRows + HLooper1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats
variables
Dim rsImages_total
Dim rsImages_first
Dim rsImages_last
' set the record count
rsImages_total = rsImages.RecordCount
' set the number of rows displayed on this page
If (rsImages_numRows < 0) Then
rsImages_numRows = rsImages_total
Elseif (rsImages_numRows = 0) Then
rsImages_numRows = 1
End If
' set the first and last displayed record
rsImages_first = 1
rsImages_last = rsImages_first + rsImages_numRows - 1
' if we have the correct record count, check the other stats
If (rsImages_total <> -1) Then
If (rsImages_first > rsImages_total) Then
rsImages_first = rsImages_total
End If
If (rsImages_last > rsImages_total) Then
rsImages_last = rsImages_total
End If
If (rsImages_numRows > rsImages_total) Then
rsImages_numRows = rsImages_total
End If
End If
%>
<%
Dim MM_paramName
%>
<%
' *** Move To Record and Go To Record: declare variables
Dim MM_rs
Dim MM_rsCount
Dim MM_size
Dim MM_uniqueCol
Dim MM_offset
Dim MM_atTotal
Dim MM_paramIsDefined
Dim MM_param
Dim MM_index
Set MM_rs = rsImages
MM_rsCount = rsImages_total
MM_size = rsImages_numRows
MM_uniqueCol = "cat"
MM_paramName = "cat"
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%
' *** Move To Specific Record: handle detail parameter
If (MM_paramIsDefined And MM_rsCount <> 0) Then
' get the value of the parameter
MM_param = Request.QueryString(MM_paramName)
' find the record with the unique column value equal to the parameter
value
MM_offset = 0
Do While (Not MM_rs.EOF)
If (CStr(MM_rs.Fields.Item(MM_uniqueCol).Value) = MM_param) Then
Exit Do
End If
MM_offset = MM_offset + 1
MM_rs.MoveNext
Loop
' if not found, set the number of records and reset the cursor
If (MM_rs.EOF) Then
If (MM_rsCount < 0) Then
MM_rsCount = MM_offset
End If
If (MM_size < 0 Or MM_size > MM_offset) Then
MM_size = MM_offset
End If
MM_offset = 0
' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Close
MM_rs.Open
End If
End If
End If
%>
<%
' *** Move To Record: if we dont know the record count, check the display
range
If (MM_rsCount = -1) Then
' walk to the end of the display range for this page
MM_index = MM_offset
While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
' if we walked off the end of the recordset, set MM_rsCount and MM_size
If (MM_rs.EOF) Then
MM_rsCount = MM_index
If (MM_size < 0 Or MM_size > MM_rsCount) Then
MM_size = MM_rsCount
End If
End If
' if we walked off the end, set the offset based on page size
If (MM_rs.EOF And Not MM_paramIsDefined) Then
If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
If ((MM_rsCount Mod MM_size) > 0) Then
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Requery
End If
' move the cursor to the selected record
MM_index = 0
While (Not MM_rs.EOF And MM_index < MM_offset)
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
End If
%>
<%
' *** Move To Record: update recordset stats
' set the first and last displayed record
rsImages_first = MM_offset + 1
rsImages_last = MM_offset + MM_size
If (MM_rsCount <> -1) Then
If (rsImages_first > MM_rsCount) Then
rsImages_first = MM_rsCount
End If
If (rsImages_last > MM_rsCount) Then
rsImages_last = MM_rsCount
End If
End If
' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL
and Form parameters
Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth
Dim MM_removeList
Dim MM_item
Dim MM_nextItem
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepURL = MM_keepURL & MM_nextItem &
Server.URLencode(Request.QueryString(MM_item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepForm = MM_keepForm & MM_nextItem &
Server.URLencode(Request.Form(MM_item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the
strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then
MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "") Then
MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<html>
<head>
<title>Images</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
-->
</style>
</head>
<body bgcolor="#000000" text="#FFFFFF" link="#999999" vlink="#999999"
alink="#999999" leftmargin="0" topmargin="0" marginwidth="0"
marginheight="0">
<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFFFFF"><div align="center"><img
src="<%=(rsCatImage.Fields.Item("catimage").Value)%>" border="0"></div>
</td>
</tr>
</table>
<hr width="100%" size="1" color="#CCCCCC">
<table>
<%
startrw = 0
endrw = HLooper2__index
numberColumns = 4
numrows = -1
while((numrows <> 0) AND (Not rsImages.EOF))
startrw = endrw + 1
endrw = endrw + numberColumns
%>
<tr align="center" valign="top">
<%
While ((startrw <= endrw) AND (Not rsImages.EOF))
%>
<td>
<div align="center"><A HREF="/images_display.asp?<%= MM_keepNone
& MM_joinChar(MM_keepNone) & "id=" & rsImages.Fields.Item("id").Value
%>"><img src="<%=(rsImages.Fields.Item("imagethumb").Value)%>"
border="0"></A> </div>
</td>
<%
startrw = startrw + 1
rsImages.MoveNext()
Wend
%>
</tr>
<%
numrows=numrows-1
Wend
%>
</table>
<hr width="100%" size="1" color="#CCCCCC">
<table>
<%
startrw = 0
endrw = HLooper1__index
numberColumns = 1
numrows = -1
while((numrows <> 0) AND (Not rsCat.EOF))
startrw = endrw + 1
endrw = endrw + numberColumns
%>
<tr align="center" valign="top">
<%
While ((startrw <= endrw) AND (Not rsCat.EOF))
%>
<td nowrap> <strong> <A HREF="/images1.asp?<%=
MM_keepNone & MM_joinChar(MM_keepNone) & "cat=" &
rsImages.Fields.Item("cat").Value
%>"><%=(rsCat.Fields.Item("cat").Value)%></A> </strong> </td>
<%
startrw = startrw + 1
rsCat.MoveNext()
Wend
%>
</tr>
<%
numrows=numrows-1
Wend
%>
</table>
<hr width="100%" size="1" color="#CCCCCC">
<font color="#FFFFFF" size="2"> <strong>14477 Memorial Dr.
Houston, Tx. 77079 281-597-0007
</strong></font></div>
</body>
</html>
<%
rsCat.Close()
Set rsCat = Nothing
%>
<%
rsImages.Close()
Set rsImages = Nothing
%>
<%
rsCatImage.Close()
Set rsCatImage = Nothing
%>
"Les Matthews" <LesAMatthews@yahoo.com> wrote in message
news:df2ep2$19s$1@forums.macromedia.com...
> "Daniel_Cha" <dan_cha@hotmail.com> wrote in message
> news:df2ccs$r4s$1@forums.macromedia.com...
>
> You are missing <%=(rsCat.Fields.Item("cat").Value)%>. The value is not
> there.
> You need to supply more code (perhaps the entire page) to obtain more
> help.
>
| |
| Les Matthews 2005-08-30, 7:38 pm |
| It appears that the "cat" field is included in the "rsImages"" recordset.
Have you tried changing, this
<td nowrap> <strong> <strong><A HREF="/images1.asp?<%=
MM_keepNone & MM_joinChar(MM_keepNone) & "cat=" &
rsImages.Fields.Item("cat").Value
%>"><%=(rsCat.Fields.Item("cat").Value)%></A></strong>
</strong> </td>
to this
<td nowrap> <strong> <strong><A HREF="/images1.asp?<%=
MM_keepNone & MM_joinChar(MM_keepNone) & "cat=" &
rsImages.Fields.Item("cat").Value
%>"><%=(rsImages.Fields.Item("cat").Value)%></A></strong>
</strong> </td>
?
Note: <%=(rsImages.Fields.Item("cat").Value)%>
"Daniel_Cha" <dan_cha@hotmail.com> wrote in message
news:df2gd7$3ft$1@forums.macromedia.com...
> ok, here is the entire page....
>
> <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
> <!--#include file="Connections/proofs.asp" -->
> <%
> Dim rsCat
> Dim rsCat_numRows
>
> Set rsCat = Server.CreateObject("ADODB.Recordset")
> rsCat.ActiveConnection = MM_proofs_STRING
> rsCat.Source = "SELECT cat FROM tbStudioImages GROUP BY cat ORDER
> BY cat ASC"
> rsCat.CursorType = 0
> rsCat.CursorLocation = 2
> rsCat.LockType = 1
> rsCat.Open()
>
> rsCat_numRows = 0
> %>
> <%
> Dim rsImages__catvar
> rsImages__catvar = "1"
> If (Request.querystring("cat") <> "") Then
> rsImages__catvar = Request.querystring("cat")
> End If
> %>
> <%
> Dim rsImages
> Dim rsImages_numRows
>
> Set rsImages = Server.CreateObject("ADODB.Recordset")
> rsImages.ActiveConnection = MM_proofs_STRING
> rsImages.Source = "SELECT * FROM tbStudioImages WHERE cat = '" +
> Replace(rsImages__catvar, "'", "''") + "'"
> rsImages.CursorType = 0
> rsImages.CursorLocation = 2
> rsImages.LockType = 1
> rsImages.Open()
>
> rsImages_numRows = 0
> %>
> <%
> Dim rsCatImage__catimg
> rsCatImage__catimg = "1"
> If (request.querystring("cat") <> "") Then
> rsCatImage__catimg = request.querystring("cat")
> End If
> %>
> <%
> Dim rsCatImage
> Dim rsCatImage_numRows
>
> Set rsCatImage = Server.CreateObject("ADODB.Recordset")
> rsCatImage.ActiveConnection = MM_proofs_STRING
> rsCatImage.Source = "SELECT cat, catimage FROM tbStudioCategory WHERE
> cat = '" + Replace(rsCatImage__catimg, "'", "''") + "'"
> rsCatImage.CursorType = 0
> rsCatImage.CursorLocation = 2
> rsCatImage.LockType = 1
> rsCatImage.Open()
>
> rsCatImage_numRows = 0
> %>
> <%
> Dim HLooper2__numRows
> HLooper2__numRows = -4
> Dim HLooper2__index
> HLooper2__index = 0
> rsImages_numRows = rsImages_numRows + HLooper2__numRows
> %>
> <%
> Dim HLooper1__numRows
> HLooper1__numRows = -1
> Dim HLooper1__index
> HLooper1__index = 0
> rsCat_numRows = rsCat_numRows + HLooper1__numRows
> %>
> <%
> ' *** Recordset Stats, Move To Record, and Go To Record: declare stats
> variables
>
> Dim rsImages_total
> Dim rsImages_first
> Dim rsImages_last
>
> ' set the record count
> rsImages_total = rsImages.RecordCount
>
> ' set the number of rows displayed on this page
> If (rsImages_numRows < 0) Then
> rsImages_numRows = rsImages_total
> Elseif (rsImages_numRows = 0) Then
> rsImages_numRows = 1
> End If
>
> ' set the first and last displayed record
> rsImages_first = 1
> rsImages_last = rsImages_first + rsImages_numRows - 1
>
> ' if we have the correct record count, check the other stats
> If (rsImages_total <> -1) Then
> If (rsImages_first > rsImages_total) Then
> rsImages_first = rsImages_total
> End If
> If (rsImages_last > rsImages_total) Then
> rsImages_last = rsImages_total
> End If
> If (rsImages_numRows > rsImages_total) Then
> rsImages_numRows = rsImages_total
> End If
> End If
> %>
> <%
> Dim MM_paramName
> %>
> <%
> ' *** Move To Record and Go To Record: declare variables
>
> Dim MM_rs
> Dim MM_rsCount
> Dim MM_size
> Dim MM_uniqueCol
> Dim MM_offset
> Dim MM_atTotal
> Dim MM_paramIsDefined
>
> Dim MM_param
> Dim MM_index
>
> Set MM_rs = rsImages
> MM_rsCount = rsImages_total
> MM_size = rsImages_numRows
> MM_uniqueCol = "cat"
> MM_paramName = "cat"
> MM_offset = 0
> MM_atTotal = false
> MM_paramIsDefined = false
> If (MM_paramName <> "") Then
> MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
> End If
> %>
> <%
> ' *** Move To Specific Record: handle detail parameter
>
> If (MM_paramIsDefined And MM_rsCount <> 0) Then
>
> ' get the value of the parameter
> MM_param = Request.QueryString(MM_paramName)
>
> ' find the record with the unique column value equal to the parameter
> value
> MM_offset = 0
> Do While (Not MM_rs.EOF)
> If (CStr(MM_rs.Fields.Item(MM_uniqueCol).Value) = MM_param) Then
> Exit Do
> End If
> MM_offset = MM_offset + 1
> MM_rs.MoveNext
> Loop
>
> ' if not found, set the number of records and reset the cursor
> If (MM_rs.EOF) Then
> If (MM_rsCount < 0) Then
> MM_rsCount = MM_offset
> End If
> If (MM_size < 0 Or MM_size > MM_offset) Then
> MM_size = MM_offset
> End If
> MM_offset = 0
>
> ' reset the cursor to the beginning
> If (MM_rs.CursorType > 0) Then
> MM_rs.MoveFirst
> Else
> MM_rs.Close
> MM_rs.Open
> End If
> End If
>
> End If
> %>
> <%
> ' *** Move To Record: if we dont know the record count, check the display
> range
>
> If (MM_rsCount = -1) Then
>
> ' walk to the end of the display range for this page
> MM_index = MM_offset
> While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
> MM_rs.MoveNext
> MM_index = MM_index + 1
> Wend
>
> ' if we walked off the end of the recordset, set MM_rsCount and MM_size
> If (MM_rs.EOF) Then
> MM_rsCount = MM_index
> If (MM_size < 0 Or MM_size > MM_rsCount) Then
> MM_size = MM_rsCount
> End If
> End If
>
> ' if we walked off the end, set the offset based on page size
> If (MM_rs.EOF And Not MM_paramIsDefined) Then
> If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
> If ((MM_rsCount Mod MM_size) > 0) Then
> MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
> Else
> MM_offset = MM_rsCount - MM_size
> End If
> End If
> End If
>
> ' reset the cursor to the beginning
> If (MM_rs.CursorType > 0) Then
> MM_rs.MoveFirst
> Else
> MM_rs.Requery
> End If
>
> ' move the cursor to the selected record
> MM_index = 0
> While (Not MM_rs.EOF And MM_index < MM_offset)
> MM_rs.MoveNext
> MM_index = MM_index + 1
> Wend
> End If
> %>
> <%
> ' *** Move To Record: update recordset stats
>
> ' set the first and last displayed record
> rsImages_first = MM_offset + 1
> rsImages_last = MM_offset + MM_size
>
> If (MM_rsCount <> -1) Then
> If (rsImages_first > MM_rsCount) Then
> rsImages_first = MM_rsCount
> End If
> If (rsImages_last > MM_rsCount) Then
> rsImages_last = MM_rsCount
> End If
> End If
>
> ' set the boolean used by hide region to check if we are on the last
> record
> MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
> %>
> <%
> ' *** Go To Record and Move To Record: create strings for maintaining URL
> and Form parameters
>
> Dim MM_keepNone
> Dim MM_keepURL
> Dim MM_keepForm
> Dim MM_keepBoth
>
> Dim MM_removeList
> Dim MM_item
> Dim MM_nextItem
>
> ' create the list of parameters which should not be maintained
> MM_removeList = "&index="
> If (MM_paramName <> "") Then
> MM_removeList = MM_removeList & "&" & MM_paramName & "="
> End If
>
> MM_keepURL=""
> MM_keepForm=""
> MM_keepBoth=""
> MM_keepNone=""
>
> ' add the URL parameters to the MM_keepURL string
> For Each MM_item In Request.QueryString
> MM_nextItem = "&" & MM_item & "="
> If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
> MM_keepURL = MM_keepURL & MM_nextItem &
> Server.URLencode(Request.QueryString(MM_item))
> End If
> Next
>
> ' add the Form variables to the MM_keepForm string
> For Each MM_item In Request.Form
> MM_nextItem = "&" & MM_item & "="
> If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
> MM_keepForm = MM_keepForm & MM_nextItem &
> Server.URLencode(Request.Form(MM_item))
> End If
> Next
>
> ' create the Form + URL string and remove the intial '&' from each of the
> strings
> MM_keepBoth = MM_keepURL & MM_keepForm
> If (MM_keepBoth <> "") Then
> MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
> End If
> If (MM_keepURL <> "") Then
> MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
> End If
> If (MM_keepForm <> "") Then
> MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
> End If
>
> ' a utility function used for adding additional parameters to these
> strings
> Function MM_joinChar(firstItem)
> If (firstItem <> "") Then
> MM_joinChar = "&"
> Else
> MM_joinChar = ""
> End If
> End Function
> %>
> <html>
> <head>
> <title>Images</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <style type="text/css">
> <!--
> -->
> </style>
> </head>
> <body bgcolor="#000000" text="#FFFFFF" link="#999999" vlink="#999999"
> alink="#999999" leftmargin="0" topmargin="0" marginwidth="0"
> marginheight="0">
> <div align="center">
> <table width="100%" border="0" cellspacing="0" cellpadding="0">
> <tr>
> <td bgcolor="#FFFFFF"><div align="center"><img
> src="<%=(rsCatImage.Fields.Item("catimage").Value)%>" border="0"></div>
> </td>
> </tr>
> </table>
> <hr width="100%" size="1" color="#CCCCCC">
> <table>
> <%
> startrw = 0
> endrw = HLooper2__index
> numberColumns = 4
> numrows = -1
> while((numrows <> 0) AND (Not rsImages.EOF))
> startrw = endrw + 1
> endrw = endrw + numberColumns
> %>
> <tr align="center" valign="top">
> <%
> While ((startrw <= endrw) AND (Not rsImages.EOF))
> %>
> <td>
> <div align="center"><A HREF="/images_display.asp?<%=
> MM_keepNone & MM_joinChar(MM_keepNone) & "id=" &
> rsImages.Fields.Item("id").Value %>"><img
> src="<%=(rsImages.Fields.Item("imagethumb").Value)%>" border="0"></A>
> </div>
> </td>
> <%
> startrw = startrw + 1
> rsImages.MoveNext()
> Wend
> %>
> </tr>
> <%
> numrows=numrows-1
> Wend
> %>
> </table>
> <hr width="100%" size="1" color="#CCCCCC">
> <table>
> <%
> startrw = 0
> endrw = HLooper1__index
> numberColumns = 1
> numrows = -1
> while((numrows <> 0) AND (Not rsCat.EOF))
> startrw = endrw + 1
> endrw = endrw + numberColumns
> %>
> <tr align="center" valign="top">
> <%
> While ((startrw <= endrw) AND (Not rsCat.EOF))
> %>
> <td nowrap> <strong> <A HREF="/images1.asp?<%=
> MM_keepNone & MM_joinChar(MM_keepNone) & "cat=" &
> rsImages.Fields.Item("cat").Value
> %>"><%=(rsCat.Fields.Item("cat").Value)%></A> </strong> </td>
> <%
> startrw = startrw + 1
> rsCat.MoveNext()
> Wend
> %>
> </tr>
> <%
> numrows=numrows-1
> Wend
> %>
> </table>
>
> <hr width="100%" size="1" color="#CCCCCC">
> <font color="#FFFFFF" size="2"> <strong>14477 Memorial Dr.
> Houston, Tx. 77079 281-597-0007
> </strong></font></div>
> </body>
> </html>
> <%
> rsCat.Close()
> Set rsCat = Nothing
> %>
> <%
> rsImages.Close()
> Set rsImages = Nothing
> %>
> <%
> rsCatImage.Close()
> Set rsCatImage = Nothing
> %>
>
> "Les Matthews" <LesAMatthews@yahoo.com> wrote in message
> news:df2ep2$19s$1@forums.macromedia.com...
>
>
| |
| Daniel_Cha 2005-08-31, 7:34 pm |
| I have tried all 3 of my recordsets....
If i use the rsCat i get the error listed on this post
If i use the rsImages i get no error, but also no links or any text
displayed
If i use the rsCatImage i get no error, but also no links or any text
displayed
example...
If i just insert the rsCat and apply the horizontal looper and view the page
i get this
Home Children Weddings Portraits Seniors
If i try to apply the Go To Detail to that recordset, i receive the error i
listed below
If i replace rsCat with rsImages and view the page... i dont get any
errors... but i do see empty cells on the page with no links
| | | | |
what can i possibly be missing or doing wrong..
If i test each of the recordsets it returns the correct values, the rest of
the page works with displaying what i ask for, but these links are killing
me.. i even pulled the code from another site i created that was entirely
built from recordsets... and tried to use the same code for this and still
nothing...
I just want to have my navigation be dynamic based on what the client
creates and then based on what that is, it takes you to the correct page....
"Les Matthews" <LesAMatthews@yahoo.com> wrote in message
news:df2mcs$bp8$1@forums.macromedia.com...
> It appears that the "cat" field is included in the "rsImages"" recordset.
>
> Have you tried changing, this
>
> <td nowrap> <strong> <strong><A HREF="/images1.asp?<%=
> MM_keepNone & MM_joinChar(MM_keepNone) & "cat=" &
> rsImages.Fields.Item("cat").Value
> %>"><%=(rsCat.Fields.Item("cat").Value)%></A></strong>
> </strong> </td>
>
> to this
>
> <td nowrap> <strong> <strong><A HREF="/images1.asp?<%=
> MM_keepNone & MM_joinChar(MM_keepNone) & "cat=" &
> rsImages.Fields.Item("cat").Value
> %>"><%=(rsImages.Fields.Item("cat").Value)%></A></strong>
> </strong> </td>
>
> ?
>
> Note: <%=(rsImages.Fields.Item("cat").Value)%>
>
> "Daniel_Cha" <dan_cha@hotmail.com> wrote in message
> news:df2gd7$3ft$1@forums.macromedia.com...
>
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|