By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Either EOF or BOF is true, or the current record has been deleted.

P: 1
hi, i am getting the error like..


Either EOF or BOF is true, or the current record has been deleted.Requested operation requires the current data.



<%@ LANGUAGE="VBSCRIPT" %>
<% 'PriceIt.asp (CV Pricing sheet).
'Project: WEPT
'Created: 6/11/00
'Author: CIH

Option Explicit
Response.AddHeader "Pragma", "No-cache"
Response.Expires = 0
Response.CacheControl = "no-cache"

If Trim(Request.Cookies("modyr"))="" Then
Response.Redirect "../MMMYmenu.asp?URL=CVPricing/PBatchMenu.asp&LevReqd=MMMY"
End If

Server.ScriptTimeout=3600
Response.Buffer = True
%>

<!-- #INCLUDE FILE = "../CSLincludes.asp" -->

<%
Dim strForm
Dim strHidden
Dim strOutput
Dim objHdrInfo
Dim rstHdrInfo
Dim strHdrInfo
Dim strError
Dim objCVP
Dim rstBatchHdr
Dim rstEntities
Dim intCounter
Dim strVATRate
Dim rstFeatures
Dim sMarket
Dim sModelLine
Dim sModelYear
Dim objAdmin
Dim rstCurrencies
Dim strBatchHdr
Dim strCur
Dim strDesc
Dim strEffDate
Dim strID

strHidden = ""
strForm = ""

'Get header info
sMarket = Request.Cookies( "mkt" )
sModelLine = Request.Cookies( "modln" )
sModelYear = Request.Cookies( "modyr" )
Set objAdmin = Server.CreateObject("WEPT_DotNet.clsAdmin")
Call objAdmin.GetHdrInfo( CStr( Request.Cookies( "user" ) ), sMarket, CStr( Request.Cookies( "lang" ) ), sModelLine, sModelYear )
Set objAdmin = Nothing

If Len( sMarket ) = 0 Or Err.number <> 0 Then
strHdrInfo = "<No description available>"
Else
strHdrInfo = sMarket & " " & sModelLine & " " & sModelYear
End If

'Get batch header
If strError = "" Then
If Request.QueryString("pBatch")="-1" Then
strBatchHdr = "New Batch" & vbCRLF
Else
Set objCVP = Server.CreateObject("WEPT_DotNet.clsCVPricing")
If Err <> 0 Then
strError = "Error creating WEPT object:" & Err.Number & " " & Err.Description
Else
Set rstBatchHdr = objCVP.GetBatchHdr(Request.Cookies("user"),Request .Cookies("mktISO"), _
Request.QueryString("pbatch"), _
Request.QueryString("source"), _
strError)
End If
If strError = "" Then
If rstBatchHdr.EOF Then
strBatchHdr = "<No info available>"
strCur = ""
strDesc = ""
strEffDate = ""
strError = "No data was found for the batch header."
Else
strBatchHdr = Request.QueryString("pbatch") & ": " & rstBatchHdr("Desc")
strCur = rstBatchHdr("Cur")
strDesc = rstBatchHdr("Desc")
strEffDate = rstBatchHdr("EffDate")
End If
rstBatchHdr.Close
End If
End If
End If
Set rstBatchHdr = Nothing

If strError = "" Then
strHidden = strHidden & _
"<INPUT TYPE='HIDDEN' NAME=txtSrc VALUE='" & Request.QueryString("source") & "'>" & vbCRLF & _
"<INPUT TYPE='HIDDEN' NAME=txtpBatch VALUE='" & Request.QueryString("pBatch") & "'>" & vbCRLF
strForm = "<TABLE>" & "<TR>"
Set objAdmin = Server.CreateObject("WEPT_DotNet.clsAdmin")
Set rstCurrencies = objAdmin.GetCurrencies(Request.Cookies("user"),Req uest.Cookies("mktISO"), strError)
If strError <> "" Then
strForm = strForm & "<TD>Currency Code: " & _
"<INPUT TYPE=TEXT SIZE=10 MAXLENGTH=8 NAME=txtCurrency VALUE='" & strCur & "'></TD" & vbCRLF
Else
strForm = strForm & "<TD>Currency: <SELECT NAME=txtCurrency>"
Do While Not rstCurrencies.EOF
If rstCurrencies("Code") = strCur Then
strForm = strForm & "<OPTION VALUE='" & rstCurrencies("Code") & "' SELECTED>" & rstCurrencies("Description") & "</OPTION>" & vbCRLF
Else
strForm = strForm & "<OPTION VALUE='" & rstCurrencies("Code") & "'>" & rstCurrencies("Description") & "</OPTION>" & vbCRLF
End If
rstCurrencies.MoveNext
Loop
rstCurrencies.Close
Set rstCurrencies = Nothing
strForm = strForm & "</SELECT></TD>" & vbCRLF
End If
strForm = strForm & "<TD>Description: " & _
"<INPUT TYPE='TEXT' SIZE=20 NAME=txtDesc VALUE=""" & strDesc & """></TD>" & vbCRLF & _
"<TD>Effective Date: " & _
"<INPUT TYPE='TEXT' SIZE=10 NAME=txtEffDate VALUE=""" & strEffDate & """>(YYYYMMDD)</TD>" & vbCRLF & _
"<TD>VAT Rate: " & _
"<INPUT TYPE='TEXT' SIZE=5 NAME=txtMstrVAT VALUE=0></TD>" & vbCRLF & _
"</TR>" & vbCRLF & _
"</TABLE>" & vbCRLF & _
"<BR>" & vbCRLF
Set objAdmin = Nothing
End If

'Begin Entity pricing
If strError = "" Then
Set objCVP = Server.CreateObject("WEPT_DotNet.clsCVPricing")
Set rstEntities = objCVP.GetEntPricing(Request.Cookies("user"),Reque st.Cookies("mktISO"), _
Request.Cookies("lang"), _
Request.Cookies("modln"), _
Request.QueryString("pbatch"), _
Request.QueryString("source"), _
strError)
End If

If strError = "" Then
strForm = strForm & "<H2><CENTER>Entity Pricing</CENTER></H2>" & vbCRLF
If Not rstEntities.BOF Then
strForm = strForm & "<TABLE BORDER VALIGN=CENTER CELLPADDING=1><TR>" & vbCRLF
strForm = strForm & "<TD BGCOLOR=#909090><FONT COLOR=#ffffff>Bodystyle</TD>" & vbCRLF
strForm = strForm & "<TD BGCOLOR=#909090><FONT COLOR=#ffffff>Derivative</TD>" & vbCRLF
strForm = strForm & "<TD BGCOLOR=#909090><FONT COLOR=#ffffff>Engine</TD>" & vbCRLF
strForm = strForm & "<TD BGCOLOR=#909090><FONT COLOR=#ffffff>Transmission</TD>" & vbCRLF
strForm = strForm & "<TD BGCOLOR=#909090><FONT COLOR=#ffffff>Axle</TD>" & vbCRLF
strForm = strForm & "<TD BGCOLOR=#909090><FONT COLOR=#ffffff>Net</TD>" & vbCRLF
strForm = strForm & "</TR>" & vbCRLF
intCounter = 0
Do While Not rstEntities.EOF
'Keep the connection alive
'Response.Write "<!-- dummy -->"
'Response.Flush
strID = CStr(intCounter)
strHidden=strHidden & "<INPUT TYPE='HIDDEN' NAME=EECd" & strID & " VALUE='" & rstEntities("EntCode") & "'>" & vbCRLF
strForm = strForm & "<TR>" & vbCRLF & _
"<TD>" & FormatTD(rstEntities("Bodystyle"), rstEntities("BodyCode")) & "</TD>" & _
"<TD>" & FormatTD(rstEntities("Derivative"), rstEntities("DerivCode")) & "</TD>" & _
"<TD>" & FormatTD(rstEntities("Engine"), rstEntities("EngCode")) & "</TD>" & _
"<TD>" & FormatTD(rstEntities("Transmission"), rstEntities("TransCode")) & "</TD>" & _
"<TD>" & FormatTD(rstEntities("Axle"), rstEntities("AxleCode")) & "</TD>"
If IsNull(rstEntities("Net")) Then strOutput = "" Else strOutput = CStr(rstEntities("Net"))
strForm = strForm & "<TD><INPUT TYPE='TEXT' SIZE=10 NAME=ENet" & strID & " VALUE='" & strOutput & "'></TD>" & vbCRLF
strForm = strForm & "</TR>" & vbCRLF
If rstEntities("VAT") <> "" And strVATRate = "" Then strVATRate = rstEntities("VAT")
rstEntities.MoveNext
intCounter=intCounter+1
Loop
strHidden=strHidden & "<INPUT TYPE='HIDDEN' NAME=txtEntRowCount VALUE='" & intCounter-1 & "'>" & vbCRLF
rstEntities.Close
Set rstEntities = Nothing
strForm = strForm & "</TABLE>" & vbCRLF
End If

End If

'Begin Feature Pricing
If strError = "" Then
Set objCVP = Server.CreateObject("WEPT_DotNet.clsCVPricing")
Set rstFeatures = objCVP.GetFeatPricing(Request.Cookies("user"),Requ est.Cookies("mktISO"), _
Request.Cookies("lang"), _
Request.Cookies("modln"), _
Request.QueryString("pbatch"), _
Request.QueryString("source"), _
strError)
End If

If strError = "" Then
strForm = strForm & "<H2><CENTER>Feature Pricing</CENTER></H2>" & vbCRLF
If Not rstFeatures.BOF Then
strForm = strForm & "<TABLE BORDER VALIGN=CENTER CELLPADDING=1><TR>" & vbCRLF
strForm = strForm & "<TD BGCOLOR=#909090><FONT COLOR=#ffffff>Del?</TD>" & vbCRLF
strForm = strForm & "<TD BGCOLOR=#909090><FONT COLOR=#ffffff>Bodystyle</TD>" & vbCRLF
strForm = strForm & "<TD BGCOLOR=#909090><FONT COLOR=#ffffff>Feature</TD>" & vbCRLF
strForm = strForm & "<TD BGCOLOR=#909090><FONT COLOR=#ffffff>Net</TD>" & vbCRLF
strForm = strForm & "</TR>" & vbCRLF
intCounter = 0
Do While Not rstFeatures.EOF
'Keep the connection alive
'Response.Write "<!-- dummy -->"
'Response.Flush
strID = CStr(intCounter)
strHidden=strHidden & "<INPUT TYPE='HIDDEN' NAME=OBCd" & strID & " VALUE='" & rstFeatures("BodyCode") & "'>" & vbCRLF
strHidden=strHidden & "<INPUT TYPE='HIDDEN' NAME=OFCd" & strID & " VALUE='" & rstFeatures("FeatCode") & "'>" & vbCRLF
strForm = strForm & "<TR>" & vbCRLF & _
"<TD><INPUT TYPE=CHECKBOX NAME=ODel" & strID & " VALUE='Del'></TD>" & _
"<TD>" & FormatTD(rstFeatures("Bodystyle"), rstFeatures("BodyCode")) & "</TD>" & _
"<TD>" & rstFeatures("FeatCode") & ": " & FormatTD(rstFeatures("Feature"), "No description") & "</TD>"
If IsNull(rstFeatures("Net")) Then strOutput = "" Else strOutput = CStr(rstFeatures("Net"))
strForm = strForm & "<TD><INPUT TYPE='TEXT' SIZE=10 NAME=ONet" & strID & " VALUE='" & strOutput & "'></TD>" & vbCRLF
strForm = strForm & "</TR>" & vbCRLF
rstFeatures.MoveNext
intCounter=intCounter+1
Loop
strHidden=strHidden & "<INPUT TYPE='HIDDEN' NAME=txtFeatRowCount VALUE='" & intCounter-1 & "'>" & vbCRLF
rstFeatures.Close
Set rstFeatures = Nothing
strForm = strForm & "</TABLE>" & vbCRLF
strForm = strForm & "<BR><BR><INPUT TYPE=BUTTON NAME=BtnSubmit VALUE='Save' onClick=""SubmitForm('Normal');"">" & vbCRLF
strForm = strForm & "<INPUT TYPE=button NAME=BtnCancel VALUE='Cancel' onClick='BtnCancel_OnClick();'>" & vbCRLF
End If

End If
Sep 21 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.