|
 |
access_asp thread: ASP Form
Message #1 by "John Howard" <jxh261@y...> on Wed, 21 Aug 2002 15:27:05
|
|
I'm trying too open a form using an asp that accesses a table in an Access
database. The Select query is returning several rows but I only want to
show one record in my form. The problem is when I try to show column data
in my form.
"I get a Either BOF or EOF is True, or the current record has been
deleted. Requested operation requires a current record."
When I add the EOF "Loop do while not dbrs.eof "
The code stops there and won't show the rest of the form.
Help!
Message #2 by "Thomas, Dean" <Dean.Thomas@u...> on Wed, 21 Aug 2002 10:25:48 -0400
|
|
John,
Can we see your code?
Dean
-----Original Message-----
From: John Howard [mailto:jxh261@y...]
Sent: Wednesday, August 21, 2002 11:27 AM
To: Access ASP
Subject: [access_asp] ASP Form
I'm trying too open a form using an asp that accesses a table in an Access
database. The Select query is returning several rows but I only want to
show one record in my form. The problem is when I try to show column data
in my form.
"I get a Either BOF or EOF is True, or the current record has been
deleted. Requested operation requires a current record."
When I add the EOF "Loop do while not dbrs.eof "
The code stops there and won't show the rest of the form.
Help!
Message #3 by "Johnson, Israel" <IJohnson@R...> on Wed, 21 Aug 2002 10:31:58 -0400
|
|
Make sure your recordset starts at the beginning of the table using the
movefirst method.
-----Original Message-----
From: John Howard [mailto:jxh261@y...]
Sent: Wednesday, August 21, 2002 11:27 AM
To: Access ASP
Subject: [access_asp] ASP Form
I'm trying too open a form using an asp that accesses a table in an Access
database. The Select query is returning several rows but I only want to
show one record in my form. The problem is when I try to show column data
in my form.
Starts
"I get a Either BOF or EOF is True, or the current record has been
deleted. Requested operation requires a current record."
When I add the EOF "Loop do while not dbrs.eof "
The code stops there and won't show the rest of the form.
Help!
Message #4 by "Daniel Groh" <daniel.groh@s...> on Wed, 21 Aug 2002 11:30:40 -0300
|
|
send us your code that is easy...send us
Thanks a lot
Daniel
----- Original Message -----
From: John Howard <jxh261@y...>
To: Access ASP <access_asp@p...>
Sent: Wednesday, August 21, 2002 3:27 PM
Subject: [access_asp] ASP Form
> I'm trying too open a form using an asp that accesses a table in an Access
> database. The Select query is returning several rows but I only want to
> show one record in my form. The problem is when I try to show column data
> in my form.
>
> "I get a Either BOF or EOF is True, or the current record has been
> deleted. Requested operation requires a current record."
>
> When I add the EOF "Loop do while not dbrs.eof "
>
> The code stops there and won't show the rest of the form.
>
> Help!
>
Message #5 by "John Howard" <jxh261@y...> on Wed, 21 Aug 2002 16:04:50
|
|
Here's the code. Hope this isn't too much. I included everything.
<%@ Language=VBScript%>
<%Option Explicit%>
<%
Dim Conn,sn,dbrs
Dim strDBPath
Dim checkornot(5)
sn = request("sn")
Set Conn = Server.CreateObject("ADODB.Connection")
'Set the connection string. This tells the connection object where
the database is and how to open it.
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & Server.MapPath("SPI.mdb")
'Open the connection. Remember that we should close this
connection when we're finished with it.
Conn.Open
'set cmd = Server.CreateObject("ADODB.Command")
'set cmd.ActiveConnection = Conn
'cmd.CommandText = "Select Last(id)As LastOfid, CabSN, Reason,
RequestedBy, WrittenBy, WrittenBy, VerifiedBy, Starts, ShortStarts,
UniversalSlot, MemRotation, TempCycle, Comments "
'cmd.CommandText = cmd.CommandText & "From SPISheet Where CabSN
Like 'HK187700082' ORDER BY id DESC"
'cmd.CommandText = cmd.CommandText & "Errorcode not like 'FE%' and
ActionType like 'Continued Testing' and BoxSerialNumber like 'HK184%'
order by teststage, errorcode"
Set dbrs = Conn.Execute("Select id, CabSN,ImplementDate,
Reason,RequestedBy,WrittenBy,DateReq,DateVer,DateWrit,VerifiedBy,Starts,Sho
rtStarts,UniversalSlot,MemRotation,TempCycle,Comments from SPISheet where
CabSN Like 'sn' ORDER BY id DESC " )
'Set dbrs = cmd.execute
%>
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<title>::STI</title>
<style type="text/css">
<!--
.roll { font-family: "Times New Roman", Times, serif; font-size: 12pt;
line-height: normal; font-weight: bold; text-transform: none; color:
#0000FF; text-decoration: none}
a.roll:hover { font-family: "Times New Roman", Times, serif; font-size:
12pt; line-height: normal; font-weight: bold; text-transform: none; color:
#FF0000; text-decoration: underline}
-->
</style>
</head>
<body bgcolor="#FFFFFF">
<table width="100" border="2" cellspacing="0" cellpadding="0"
align="center" height="35">
<tr valign="middle" align="center">
<td height="30"><font face="Times New Roman, Times, serif"
size="5"><b>Step
1</b></font></td>
</tr>
</table>
<a name="Top"></a>
<hr>
<p align="center"><u><span><font face="Times New Roman, Times, serif"
size="6"><b>Special
Test Instructions<o:p></o:p></b></font><b><font
size="6"><o:p></o:p></font></b><font size="6"><o:p></o:p></font><font
size="5"><o:p></o:p></font><o:p></o:p></span></u></p>
<p class=MsoSubtitle align="center"><span style='font-weight:normal'><font
face="Times New Roman, Times, serif" size="2"><b>Refer<span
style="mso-spacerun: yes"> </span>to Op0422 for instructions on the use
of this
form. Form is NOT valid if altered after initial release<o:p><br>
</o:p></b></font></span><font face="Times New Roman, Times, serif"
size="2"><span style='font-weight:normal'><b>All
Sections MUST be completed<o:p></o:p></b></span></font><b><font
size="2"><span style='font-
weight:normal'><o:p></o:p><o:p></o:p></span></font><span style='font-
weight:normal'><o:p></o:p><o:p></o:p></span></b><span style='font-
weight:normal'><o:p></o:p></span></p>
<table width="663" border="0" cellpadding="0" cellspacing="0"
align="center">
<tr>
<td colspan="5"><span style='font-size:
14.0pt;mso-bidi-font-size:10.0pt;font-weight:normal'><font face="Times New
Roman, Times, serif" size="4">Apply
To Systems: <%=Response.Write(sn)%></font></span></td>
</tr>
<tr>
<td colspan="5"> </td>
</tr>
<tr>
<td colspan="5"><span style='font-size:
14.0pt;mso-bidi-font-size:10.0pt;font-weight:normal'><font face="Times New
Roman, Times, serif" size="4">Reason
for Initiation (ie:purge, eco, tco, test software etc.):<span
style="mso-spacerun: yes"> </span></font></span></td>
</tr>
<tr>
<%
do while not dbrs.eof
%>
<td colspan="5" height="37"> <%=Response.Write(dbrs("Reason"))%></td>
</tr>
<tr>
<td width="127"><font face="Times New Roman, Times, serif"
size="2"><span style='font-size:
14.0pt;mso-bidi-font-size:10.0pt;font-weight:normal'>Requested
by:</span></font></td>
<td width="205"><font size="2" face="Times New Roman, Times,
serif"><b> <%=Response.Write(dbrs("RequestedBy"))%></b></font></td>
<td width="12"><font size="2" face="Times New Roman, Times,
serif"><b><span style='font-size:
14.0pt;mso-bidi-font-size:10.0pt;font-
weight:normal'></span></b></font></td>
<td width="49"><font size="2" face="Times New Roman, Times,
serif"><b><span style='font-size:
14.0pt;mso-bidi-font-size:10.0pt;font-
weight:normal'>Date:<o:p></o:p></span></b></font></td>
<td width="270"><font size="2" face="Times New Roman, Times,
serif"><b><%=Response.Write(dbrs("DateReq"))%><span style='font-size:
14.0pt;mso-bidi-font-size:10.0pt;font-
weight:normal'><o:p></o:p></span></b></font></td>
</tr>
<tr>
<td width="127"><font size="2" face="Times New Roman, Times,
serif"><b><span style='font-size:
14.0pt;mso-bidi-font-size:10.0pt;font-weight:normal'>Written
By:</span></b></font></td>
<td width="205"><font size="2" face="Times New Roman, Times,
serif"><b> <%=Response.Write(dbrs("WrittenBy"))%></b></font></td>
<td width="12"><font size="2" face="Times New Roman, Times,
serif"><b></b></font></td>
<td width="49"><font size="2" face="Times New Roman, Times,
serif"><b><span style='font-size:
14.0pt;mso-bidi-font-size:10.0pt;font-
weight:normal'>Date:</span></b></font></td>
<td width="270"><font size="2" face="Times New Roman, Times,
serif"><b><%=Response.Write(dbrs("DateWrit"))%>
</b></font></td>
</tr>
<tr>
<td width="127"><font size="2" face="Times New Roman, Times,
serif"><b><span style='font-size:
14.0pt;mso-bidi-font-size:10.0pt;font-weight:normal'>Verified
By:</span></b></font></td>
<td width="205"><font size="2" face="Times New Roman, Times,
serif"><b> <%=Response.Write(dbrs("VerifiedBy"))%></b></font></td>
<td width="12"><font size="2" face="Times New Roman, Times,
serif"><b></b></font></td>
<td width="49"><font size="2" face="Times New Roman, Times,
serif"><b><span style='font-size:
14.0pt;mso-bidi-font-size:10.0pt;font-
weight:normal'>Date:</span></b></font></td>
<td width="270"><font size="2" face="Times New Roman, Times,
serif"><b><%=Response.Write(dbrs("DateVer"))%><span style='font-size:
14.0pt;mso-bidi-font-size:10.0pt;font-weight:normal'> </span>
</b></font></td>
</tr>
</table>
<table width="664" border="1" height="52" cellspacing="0"
cellpadding="0" align="center">
<tr valign="middle">
<td>
<p class=MsoSubtitle align=left style='text-align:left'><font
face="Times New Roman, Times, serif" size="3"><span style='font-size:
12.0pt;mso-bidi-font-size:10.0pt;font-weight:normal'><b>Implement
Date:<span style='mso-tab-count:1'> </span></b></span></font><font
size="2" face="Times New Roman, Times, serif"><b></b></font><font
face="Times New Roman, Times, serif" size="3"><span style='font-size:
12.0pt;mso-bidi-font-size:10.0pt;font-weight:normal'><b><span style='mso-
tab-count:1'>
</span></b></span></font><font size="2" face="Times New Roman,
Times, serif"><b><%=Response.Write(dbrs("ImplementDate"))%
></b></font><font face="Times New Roman, Times, serif" size="3"><span
style='font-size:
12.0pt;mso-bidi-font-size:10.0pt;font-weight:normal'><b><span style='mso-
tab-count:1'>
</span></b></span></font></p>
</td>
<td><font face="Times New Roman, Times, serif" size="3"><span
style='font-size:
12.0pt;mso-bidi-font-size:10.0pt;font-weight:normal'><b>Expiration Date:
<o:p></o:p></b><o:p>
</o:p></span></font></td>
</tr>
</table>
<table width="770" border="0" cellpadding="0" align="center"
cellspacing="0">
<tr>
<td><span style='font-size:
12.0pt;mso-bidi-font-size:10.0pt;font-
weight:normal'> <o:p></o:p></span><b style='mso-bidi-font-
weight:normal'><span
style='font-size:14.0pt;mso-bidi-font-size:10.0pt'>Special Test
Instructions:</span></b><b
style='mso-bidi-font-weight:normal'><span style='font-size:12.0pt;mso-bidi-
font-size:
10.0pt'> (See Attachment for Configuration Instructions)</span></b></td>
</tr>
</table>
<br>
<table width="770" border="1" height="281" cellspacing="0"
cellpadding="0" align="center">
<tr valign="top">
<td height="250">
<table width="132" border="0" cellspacing="0" cellpadding="0"
height="119">
<tr>
<td width="18" height="36"> </td>
<td width="78" height="36"><span
style='font-size:8.0pt;mso-bidi-font-size:10.0pt;font-family:Arial;
mso-bidi-font-family:"Times New Roman"'>Starts</span></td>
<td colspan="2" width="36" height="36">
<div align="center"> <%=Response.write(dbrs("Starts"))%></div>
</td>
</tr>
<tr>
<td width="18" height="33"> </td>
<td width="78" height="33">
<p class=MsoNormal><span style='font-size:8.0pt;mso-bidi-
font-size:10.0pt;
font-family:Arial;mso-bidi-font-family:"Times New Roman"'>Short<b
style='mso-bidi-font-weight:normal'> </b></span><b
style='mso-bidi-font-weight:normal'><span style='font-size:8.0pt;mso-
bidi-font-size:
10.0pt;font-family:Arial;mso-bidi-font-family:"Times New
Roman"'><o:p></o:p></span></b><span
style='font-size:8.0pt;mso-bidi-font-size:10.0pt;font-family:Arial;
mso-bidi-font-family:"Times New Roman"'>Starts</span></p>
</td>
<td colspan="2" width="36" height="33">
<div align="center"> <%=Response.write(dbrs("ShortStarts"))%
></div>
</td>
</tr>
<tr>
<td width="18" height="33"> </td>
<td width="78" height="33"><span
style='font-size:8.0pt;mso-bidi-font-size:10.0pt;font-family:Arial;
mso-bidi-font-family:"Times New Roman"'>Unv Slot<o:p></o:p></span></td>
<td colspan="2" width="36" height="33">
<div align="center"> <%=Response.write(dbrs("UniversalSlot"))%
></div>
</td>
</tr>
<tr>
<td width="18" height="30"> </td>
<td width="78" height="30"><span
style='font-size:8.0pt;mso-bidi-font-size:10.0pt;font-family:Arial;
mso-bidi-font-family:"Times New Roman"'>Mem Rot<o:p></o:p></span></td>
<td colspan="2" width="36" height="30">
<div align="center"><%=Response.write(dbrs("MemRotation"))%>
</div>
</td>
</tr>
<tr>
<td width="18"> </td>
<td width="78"><span
style='font-size:8.0pt;mso-bidi-font-size:10.0pt;font-family:Arial;
mso-bidi-font-family:"Times New Roman"'><o:p>Temp Chamber
Testing</o:p></span></td>
<td colspan="2" width="36">
<div align="center"><%=Response.write(dbrs("TempCycle"))%>
</div>
</td>
</tr>
</table>
<p><font face="Times New Roman, Times, serif"
size="3"><b>Comments:</b></font><br>
<%=Response.write(dbrs("Comments"))%>
<br>
</p>
</td>
<%
dbrs.movenext
loop
%>
</tr>
</table>
<table width="770" border="0" cellpadding="0" align="center"
cellspacing="0">
<tr>
<td height="157">
<p class=MsoNormal><span style='font-size:8.0pt;mso-bidi-font-
size:10.0pt'>Create
an incident that includes all added TCO dir, mem, drives etc?.
Be sure
all instructions are carried out, note the completion of
instructions
in the incident log. Follow the checklist for completing test
stages.<o:p></o:p></span></p>
<p class=MsoBodyText><span style='font-size:8.0pt;mso-bidi-font-
size:10.0pt'><o:p></o:p></span><span style='font-family:"Times New
Roman"'><font face="Times New Roman, Times, serif" size="3">Instruction
Completed By:<u><span style="mso-spacerun:
yes">
</span></u><span style='mso-tab-count:1'> </span>Date:
____/____/____<o:p></o:p></font></span></p>
<p class=MsoBodyText><font face="Times New Roman, Times, serif"
size="3"><span style='font-family:"Times New Roman"'>Incident
# : <u>_________ </u></span></font><span style='font-
family:"Times New Roman"'><span style="mso-spacerun:
yes"> </span><o:p></o:p></span></p>
</td>
</tr>
<%
'dbrs.movenext
'loop
%>
</table>
<table width="770" border="0" cellpadding="0" align="center"
cellspacing="0" height="33">
<tr>
<td colspan="2">
<div align="center"> </div>
<div align="center">
</div>
</td>
</tr>
</table>
</form>
</body>
</html>
<%
set dbrs = nothing
Conn.Close
%>
> send us your code that is easy...send us
Thanks a lot
Daniel
----- Original Message -----
From: John Howard <jxh261@y...>
To: Access ASP <access_asp@p...>
Sent: Wednesday, August 21, 2002 3:27 PM
Subject: [access_asp] ASP Form
> I'm trying too open a form using an asp that accesses a table in an
Access
> database. The Select query is returning several rows but I only want to
> show one record in my form. The problem is when I try to show column data
> in my form.
>
> "I get a Either BOF or EOF is True, or the current record has been
> deleted. Requested operation requires a current record."
>
> When I add the EOF "Loop do while not dbrs.eof "
>
> The code stops there and won't show the rest of the form.
>
> Help!
>
Message #6 by "Daniel Groh" <daniel.groh@s...> on Wed, 21 Aug 2002 12:22:06 -0300
|
|
I cann't run it here, so can you tell me which the line error?
I think that records you are selecting doesn't exist
and please comment just the line of the do while, giving a "response.end" the rest can be normal....later you can tell me what
happened ok?
look here:
...font face="Times New
Roman, Times, serif" size="4">Reason
for Initiation (ie:purge, eco, tco, test software etc.):<span
style="mso-spacerun: yes"> </span></font></span></td>
</tr>
<tr>
<%
response.end
do while not dbrs.eof
%>
<td colspan="5" height="37"> <%=Response.Write(dbrs("Reason"))%></td>
</tr>
<tr>
<td width="127"><font face="Times New Roman, Times, serif"
size="2">...
|
|
 |