Click here to Skip to main content
15,889,216 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHow to pass multidimensional array to client Pin
MrBink2-Nov-06 11:57
MrBink2-Nov-06 11:57 
AnswerRe: How to pass multidimensional array to client Pin
Guffa2-Nov-06 14:06
Guffa2-Nov-06 14:06 
GeneralRe: How to pass multidimensional array to client Pin
MrBink2-Nov-06 14:55
MrBink2-Nov-06 14:55 
QuestionConnectionString Problem!!! [modified] Pin
immori2-Nov-06 11:47
immori2-Nov-06 11:47 
QuestionRe: ConnectionString Problem!!! Pin
Guffa2-Nov-06 14:08
Guffa2-Nov-06 14:08 
AnswerRe: ConnectionString Problem!!! Pin
immori3-Nov-06 18:51
immori3-Nov-06 18:51 
AnswerRe: ConnectionString Problem!!! Pin
Guffa4-Nov-06 2:24
Guffa4-Nov-06 2:24 
QuestionError Type: Either BOF or EOF is True Pin
Skanless2-Nov-06 11:25
Skanless2-Nov-06 11:25 
I am not sure why I am getting this error if I have included: "IF NOT GOSSearchRS.BOF AND GOSSearchRS.EOF THEN". I hate to include the whole code but it may prove necessasry to get a response. It runs OK when I submit an empty value but if I search for something that's not in the database I get the error. See Error and Source Code Below.


Error Type:
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/gregstore/GregStoreMPSearchPage.asp, line 117

Source Code:
<!-- #INCLUDE FILE="adovbs.inc" -->
<!-- The file above is need for the usage of cursors used with retrieving the recordset. -->
<%
'Get Search Phrase
SearchFor = TRIM( Request( "searchfor" ) )


'Open database connection
Set dbCon = Server.CreateObject( "ADODB.Connection" )
dbCon.Open "GregStore"




%>

<HTML>
<HEAD><TITLE>Welcome to Greg's Online Store - Search </TITLE></HEAD>

<body link ="#ff4040" vtext="lightred" bgcolor="White">
<center>

<table width=640 border=0 cellspacing=0 cellpadding=0>

<tr>
<td bgcolor="lightblue">
<img src="belizeflag.gif">

<font size="5"><b>Welcome to Greg's Online Store!!</b>
</td>

<td align = right valign = "bottom">
<a href="cart.asp">Shopping Cart </a>
|
<a href = "account.asp"> Account </a>
</td>
</tr>

<tr>
<td colspan=2>
<hr width = "640" >
</td>
</tr>
</table>

<table width = 640 border=0 bgcolor="Azure" cellpadding=0 cellspacing=0>
<tr> <td valign = "top">

<table border=0 cellpadding=0 cellspacing=0>
<tr> <td valign = "bottom" bgcolor= "pink">
<img src="search.gif" vspace=0 border=0></td>
</tr>
<tr>
<td>

<table width = "200" border=1 cellpadding=4 cellspacing=0 bgcolor="lightyellow">
<tr>
<td>
<FORM METHOD="POST" ACTION = "GregStoreMPSearchPage.asp">
<input name = "searchfor" size="15">
<input type = "submit" value = "Search">
</form>
</td>
</tr>

</table>
</td>
</tr>
<tr>
<td> &nbsp; </td>
</tr>
<tr>
<td valign="bottom">
<img src = "Categories.gif" vspace=0 border=0></td>
</tr>
<tr>
<td>
<table width="200" cellpadding=4 cellspacing=0 bgcolor="lightyellow" border=1>

<tr>
<td>
<font size="3"><b>


<!-- #INCLUDE FILE="GregStoreProductCategory.asp" -->

</b></font>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td><td valign="top">
<%

'Get The curent Page

pg = TRIM(Request( "pg" ))
IF pg = "" THEN pg = 1

SET GOSSearchRS = Server.CreateObject( "ADODB.Recordset" )
GOSSearchRS.ActiveConnection = dbCon
GOSSearchRS.CursorType = adOpenStatic
GOSSearchRS.PageSize = 5

'SQL Query String

sqlString = "SELECT product_id, product_picture, product_name, product_briefdesc " &_
"FROM Products " &_
"WHERE product_status = 1 " &_
"AND (product_name LIKE '%" & SearchFor & "%' " &_
"OR product_briefdesc LIKE '%" & SearchFor &"%' ) " &_
"ORDER BY product_name "

GOSSearchRS.OPEN sqlString
GOSSearchRS.AbsolutePage = pg

IF NOT GOSSearchRS.BOF AND GOSSearchRS.EOF THEN

%>

<table width="350" cellpadding=5 cellspacing=0 border=0>

<tr>
<td colspan=2>
<font size="3" color="darkblue">
<b>Search Results:</b>
</font>
</td>
</tr>

<% WHILE NOT GOSSearchRS.EOF AND rowCount < GOSSearchRS.PageSize
rowCount = rowCount + 1 %>

<tr>
<td>
<% IF GOSSearchRS( "product_picture" ) <> "?????" THEN %>
<IMG SRC = "<%=GOSSearchRS( "product_picture" ) %>"
HSPACE=4 VSPACE=4 BORDER=4 align="center">
<% END IF %>
</td>
<td>
<a href="GregStoreProduct.asp?pid=<%=GOSSearchRS( "product_id" )%>" >
<b><%=GOSSearchRS( "product_name" )%></b></a>
<br><%=GOSSearchRS( "product_briefdesc" )%>
<br><a href= "GregStoreProduct.asp?pid=<%=GOSSearchRS( "product_id" )%>" >
get more information</a>
</td>
</tr>
<tr>
<td colspan=2 align="center">
&nbsp;
</td>
</tr>

<%
GOSSearchRS.MoveNext
WEND
%>
</table>
<%
IF GOSSearchRS.PageCount > 1 THEN
%>
<font color = "darkgreen">
<b>Go to Page: </b>
<%
FOR i = 1 to GOSSearchRS.PageCount
IF i <> cINT( pg ) THEN
%>
<a href="GregStoreMPSearchPage.asp?searchfor=<%=Server.URLEncode( searchfor )%>&pg=<%=i%>">
<%=i%></a> &nbsp;

<%ELSE%>

<b><%=i%></b> &nbsp;

<% End IF %>

<% Next %>

</font>

<% End IF %>

<% else %>

<table width="350" cellpadding=5 cellspacing=0 border=0>

<tr>
<td>

<font face="Arial" color="darkblue">
<b>No Product Matched your search Terms </b>
</font>
</td>
</tr>
</table>


<% End IF %>
</td></tr>
</table>
<hr width=640>

Copyright &copy; 2006 Dominguez-Burns Inc.

</center>
</body>
</HTML>






Greg

Coding makes the world go round!!!
AnswerRe: Error Type: Either BOF or EOF is True Pin
Akhilesh Yadav2-Nov-06 23:31
Akhilesh Yadav2-Nov-06 23:31 
QuestionHTTP Module and Application path Pin
Ponzano Paolo2-Nov-06 10:10
Ponzano Paolo2-Nov-06 10:10 
AnswerRe: HTTP Module and Application path Pin
Akhilesh Yadav2-Nov-06 23:34
Akhilesh Yadav2-Nov-06 23:34 
QuestionPostback result in new window? Pin
pahlsson2-Nov-06 9:41
pahlsson2-Nov-06 9:41 
AnswerRe: Postback result in new window? Pin
Britney S. Morales2-Nov-06 11:58
Britney S. Morales2-Nov-06 11:58 
QuestionSQL Server 2005 Looping Pin
nature02762-Nov-06 9:37
nature02762-Nov-06 9:37 
QuestionMultiple SiteMapProviders Pin
nlindley72-Nov-06 9:20
nlindley72-Nov-06 9:20 
QuestionAsp.net User controls Pin
mcd24242-Nov-06 8:32
mcd24242-Nov-06 8:32 
AnswerRe: Asp.net User controls Pin
Guffa2-Nov-06 8:43
Guffa2-Nov-06 8:43 
GeneralRe: Asp.net User controls Pin
mcd24242-Nov-06 8:46
mcd24242-Nov-06 8:46 
QuestionAdd nodes to SiteMapPath Pin
shapper2-Nov-06 7:46
shapper2-Nov-06 7:46 
AnswerRe: Get XML node value Pin
Elina Blank2-Nov-06 7:46
sitebuilderElina Blank2-Nov-06 7:46 
QuestionOpensource Groups? Source Code? Recommended Books/Sites? Please Help! Pin
Luke Armstrong2-Nov-06 6:14
Luke Armstrong2-Nov-06 6:14 
AnswerRe: Opensource Groups? Source Code? Recommended Books/Sites? Please Help! Pin
Luke Armstrong2-Nov-06 12:37
Luke Armstrong2-Nov-06 12:37 
Question.net 2.0 Custom Web Services in SharePoint 2003 Pin
braber2-Nov-06 5:31
braber2-Nov-06 5:31 
QuestionGo through XML nodes Pin
shapper2-Nov-06 4:30
shapper2-Nov-06 4:30 
AnswerRe: Go through XML nodes Pin
braber2-Nov-06 5:37
braber2-Nov-06 5:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.