My brain is nuked....Can anybody tell me right off the bat what is
wrong with this code? Along with any glaring errors, please let me
know the syntax to display a message (Response.Write would be fine I
think) that will say "I'm sorry but the data you requested cannot be
found" or something along those lines....
This code is on an archive page I have on my company's intranet....The
end result is to show 3 records at a time pulled from an Access DB and
display on the screen....If the information IS found, everything seems
to work alright but if it's not I get the error msg listed....Inste ad
of that error msg I'd like to get the friendly message for the user
basically saying "Sorry but your info can't be found" (see
above)....Any help/suggestions would be great....I'm fried....In the
process of trying to improve my work I broke it....I'm a newbie to ASP
so please, hook a brother up with some advice...
My error message....
*****
ADODB.Recordset error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record.
/jax/wh/Online_Forms/Secured_Archive s/search_files/search_results_ wave.asp,
line 57
*****
My code from search_results_ wave.asp....
*****
<!-- #INCLUDE VIRTUAL="/_borders/top_nav.asp" -->
<%
Mode = request.form("m ode")
Name = request.form("n ame")
Shift = request.form("s hift")
Wave = request.form("w ave")
Carton = request.form("c arton")
Location = request.form("l ocation")
License = request.form("l icense")
Sku = request.form("s ku")
Qty = request.form("q uantity")
Reason = request.form("r eason")
Comments = request.form("c omments")
waveyear = request.form("w aveyear")
wavemonth = request.form("w avemonth")
waveday = request.form("w aveday")
wavenumber = request.form("w avenumber")
'************** *************** *************** *************** *************** ***
'* DATABASE APPENDING
*
'************** *************** *************** *************** *************** ***
If IsEmpty (Request.QueryS tring("pageNum" )) Then
curPage = 1
Else
curPage = CInt(Request.Qu eryString("page Num"))
End If
'create db connection
Set dbconn = Server.CreateOb ject("ADODB.Con nection")
'open db in a DSN-less method
dbconn.Open "PROVIDER=MICRO SOFT.JET.OLEDB. 4.0;DATA SOURCE="&
Server.MapPath( "/jax/wh/Online_Forms/Secured_Archive s/search_files/shortage.mdb")
'create recordset object
Set rs = Server.CreateOb ject("ADODB.Rec ordset")
'specify more info about rs
rs.CursorLocati on = 3
rs.CursorType = 3
rs.PageSize = 3
rs.open "shortage", dbconn
'sql statement to return input values drawn from html fields within
previous week
SQLqry = "SELECT * FROM shortage WHERE wave = '"&waveyear& wavemonth&
waveday& wavenumber&"'"
'display results of statement on screen for testing purposes
Response.Write "<h3><b><u> " & (SQLqry) & "</u></b></h3><br>"
'execute SQL statement
'Set db = dbconn.Execute( SQLqry)
rs.Close
rs.Open SQLqry
rs.AbsolutePage = curPage
Response.Write "<p>You are on page: " & curPage & " of " &
rs.PageCount
Response.Write "<br>"
Response.Write "<br>"
For i = 1 to rs.PageSize
If rs.EOF Then Exit For
Response.Write "<b>Name :</b> " & rs("name")
Response.Write "<br>"
Response.Write "<b>Shift :</b> " & rs("shift")
Response.Write "<br>"
Response.Write "<b>Wave Number :</b> " & rs("wave")
Response.Write "<br>"
Response.Write "<b>Carton Number :</b> " & rs("carton")
Response.Write "<br>"
Response.Write "<b>Locatio n :</b> " & rs("location")
Response.Write "<br>"
Response.Write "<b>License :</b> " & rs("license")
Response.Write "<br>"
Response.Write "<b>SKU :</b> " & rs("sku")
Response.Write "<br>"
Response.Write "<b>Quantit y :</b> " & rs("qty")
Response.Write "<br>"
Response.Write "<b>Reason :</b> " & rs("reason")
Response.Write "<br>"
Response.Write "<b>Comment s :</b> " & rs("comments")
Response.Write "<br>"
Response.Write "<b>Date Submitted :</b> " & rs("date")
Response.Write "<hr>"
rs.MoveNext
Next
If curPage > 1 then
Response.Write "<a href='search_re sults_wave.asp? pageNum=" &
curPage-1 & "'>Previous </a>"
If curPage < rs.PageCount then
Response.Write " | "
end if
end if
If curPage < rs.PageCount then
Response.Write "<a href='search_re sults_wave.asp? pageNum=" &
curPage+1 & "'>Next</a>"
end if
'close recordset
rs.Close
'zero out recordset object
Set rs = Nothing
'smack around the db connection until it lets go
dbconn.Close
'terminate db connection with extreme prejudice
set dbconn = nothing
%>
<br><a href="../Archives.asp">R eturn to Archives</a>
<br><a href="../../Shortage.asp">R eturn to Shortage Submission
Form</a>
<br><a href="../../../default.asp">Re turn to Warehouse
Operations</a><!-- #INCLUDE VIRTUAL="/_borders/bottom_nav.asp" -->
*****
wrong with this code? Along with any glaring errors, please let me
know the syntax to display a message (Response.Write would be fine I
think) that will say "I'm sorry but the data you requested cannot be
found" or something along those lines....
This code is on an archive page I have on my company's intranet....The
end result is to show 3 records at a time pulled from an Access DB and
display on the screen....If the information IS found, everything seems
to work alright but if it's not I get the error msg listed....Inste ad
of that error msg I'd like to get the friendly message for the user
basically saying "Sorry but your info can't be found" (see
above)....Any help/suggestions would be great....I'm fried....In the
process of trying to improve my work I broke it....I'm a newbie to ASP
so please, hook a brother up with some advice...
My error message....
*****
ADODB.Recordset error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record.
/jax/wh/Online_Forms/Secured_Archive s/search_files/search_results_ wave.asp,
line 57
*****
My code from search_results_ wave.asp....
*****
<!-- #INCLUDE VIRTUAL="/_borders/top_nav.asp" -->
<%
Mode = request.form("m ode")
Name = request.form("n ame")
Shift = request.form("s hift")
Wave = request.form("w ave")
Carton = request.form("c arton")
Location = request.form("l ocation")
License = request.form("l icense")
Sku = request.form("s ku")
Qty = request.form("q uantity")
Reason = request.form("r eason")
Comments = request.form("c omments")
waveyear = request.form("w aveyear")
wavemonth = request.form("w avemonth")
waveday = request.form("w aveday")
wavenumber = request.form("w avenumber")
'************** *************** *************** *************** *************** ***
'* DATABASE APPENDING
*
'************** *************** *************** *************** *************** ***
If IsEmpty (Request.QueryS tring("pageNum" )) Then
curPage = 1
Else
curPage = CInt(Request.Qu eryString("page Num"))
End If
'create db connection
Set dbconn = Server.CreateOb ject("ADODB.Con nection")
'open db in a DSN-less method
dbconn.Open "PROVIDER=MICRO SOFT.JET.OLEDB. 4.0;DATA SOURCE="&
Server.MapPath( "/jax/wh/Online_Forms/Secured_Archive s/search_files/shortage.mdb")
'create recordset object
Set rs = Server.CreateOb ject("ADODB.Rec ordset")
'specify more info about rs
rs.CursorLocati on = 3
rs.CursorType = 3
rs.PageSize = 3
rs.open "shortage", dbconn
'sql statement to return input values drawn from html fields within
previous week
SQLqry = "SELECT * FROM shortage WHERE wave = '"&waveyear& wavemonth&
waveday& wavenumber&"'"
'display results of statement on screen for testing purposes
Response.Write "<h3><b><u> " & (SQLqry) & "</u></b></h3><br>"
'execute SQL statement
'Set db = dbconn.Execute( SQLqry)
rs.Close
rs.Open SQLqry
rs.AbsolutePage = curPage
Response.Write "<p>You are on page: " & curPage & " of " &
rs.PageCount
Response.Write "<br>"
Response.Write "<br>"
For i = 1 to rs.PageSize
If rs.EOF Then Exit For
Response.Write "<b>Name :</b> " & rs("name")
Response.Write "<br>"
Response.Write "<b>Shift :</b> " & rs("shift")
Response.Write "<br>"
Response.Write "<b>Wave Number :</b> " & rs("wave")
Response.Write "<br>"
Response.Write "<b>Carton Number :</b> " & rs("carton")
Response.Write "<br>"
Response.Write "<b>Locatio n :</b> " & rs("location")
Response.Write "<br>"
Response.Write "<b>License :</b> " & rs("license")
Response.Write "<br>"
Response.Write "<b>SKU :</b> " & rs("sku")
Response.Write "<br>"
Response.Write "<b>Quantit y :</b> " & rs("qty")
Response.Write "<br>"
Response.Write "<b>Reason :</b> " & rs("reason")
Response.Write "<br>"
Response.Write "<b>Comment s :</b> " & rs("comments")
Response.Write "<br>"
Response.Write "<b>Date Submitted :</b> " & rs("date")
Response.Write "<hr>"
rs.MoveNext
Next
If curPage > 1 then
Response.Write "<a href='search_re sults_wave.asp? pageNum=" &
curPage-1 & "'>Previous </a>"
If curPage < rs.PageCount then
Response.Write " | "
end if
end if
If curPage < rs.PageCount then
Response.Write "<a href='search_re sults_wave.asp? pageNum=" &
curPage+1 & "'>Next</a>"
end if
'close recordset
rs.Close
'zero out recordset object
Set rs = Nothing
'smack around the db connection until it lets go
dbconn.Close
'terminate db connection with extreme prejudice
set dbconn = nothing
%>
<br><a href="../Archives.asp">R eturn to Archives</a>
<br><a href="../../Shortage.asp">R eturn to Shortage Submission
Form</a>
<br><a href="../../../default.asp">Re turn to Warehouse
Operations</a><!-- #INCLUDE VIRTUAL="/_borders/bottom_nav.asp" -->
*****
Comment