473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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
0 1081

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

Similar topics

3
by: Maria | last post by:
Is there another way to delete the current record in a subform from the main form, another subform or a sub-subform other than setting focus on a field in the subform and using run command...
3
by: Prakash | last post by:
Below is my code to delete a record in a continuous form. I can't figure out any reason but sometimes (another) record gets deleted instead of where the record pointer is positioned. Small table...
3
by: hebandgene | last post by:
When I delete a record in a subform I get the warning that I'm about to delete a record, followed by an error "No current record." When I click OK obviously the record is deleted and it goes to...
6
by: jpatchak | last post by:
Hello, I have a main form with one subform. I have a command button on the main form to delete the current record. Below is my code. The tables on which the main form and subform are based...
3
by: Kosmos | last post by:
Hey ya'll...I can't seem to figure out why I'm getting this error message, but it all started when I added the new line of code with the recSet5.AddNew --- when I ran the first line, the logic worked...
3
by: marcf | last post by:
Hi Everyone, Hopefully someone will be able to offer a suggestion to this problem. I have a multi user CMS running at work which I wrote. Aside from a few bugs everything has been going fine...
1
by: THEAF | last post by:
i'm trying to create a reminder form, when i add a new reminder its ok but when i try to delete a reminder then i get No Current Record problem. Form Load Private Sub Form_Load() Dim s() As...
5
by: TimSki | last post by:
Hi, This is very strange... I have a simple query using a recordset thus... set rsID = CreateObject("ADODB.recordset") searchPhrase = "SELECT blah...." rsID.Open searchPhrase, oConn
1
vikas251074
by: vikas251074 | last post by:
Hello sir, I am facing some problem for which I am trying hard to solve it. But in vain. This programe is for View/Deletion. When I run program for first time, I select vlan from list and press...
4
by: jbrumbau | last post by:
Hello, I have a function that goes through each field in a form and checks if it was changed between itself and the existing recordset. It is used to track changes done in any record when the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.