472,794 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Cannot retrive value

114 100+
Dear Friends,

I have create a form in which user can update his/her records. The data can retrieved from the code which i have put in dropdown menu. Now I want to display all the records as per the dropdown menu changed.

I have retrieved proposalcode from the table in a dropdown menu and from that dropdown menu I am selecting records from the same table.
I have tried it but I don't know why I am getting error.

I am getting the following error:

ADODB.Field error '800a0bcd'

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

/prog_report_qtrly.asp, line 20



Here is the code.................

[HTML]<!-- #include file="include/connection.asp" -->

<%
propcode_list = request.form("propcode_list")

DIM mySQL_code,mySQL_code1
mySQL_code = "SELECT propcode FROM register_confirmed"
mySQL_code1 = "SELECT * FROM register_confirmed where propcode = '"& propcode_list &"'"


DIM objRS, objRS2
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS2 = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL_code1, con
objRS2.Open mySQL_code, con

if objRS2.recordcount = 0 then
response.write "No records found"
else
propcode2 = objRS("propcode")
proptitle2=objRS("proptitle")
end if

%>


<html>
<head>
<script language="JavaScript">
function gone()
{
location=document.frm.propcode.options[document.frm.propcode.selectedIndex].value
}

</script>
</head>

<form name="frm" action="codeview.asp" method="post">
<select name="propcode_list">

<%
if objRS2.recordcount = 0 then
%>

<option value="empty">No records found</option>

<%
else

On Error Resume Next
objRS2.MoveFirst
do while Not objRS2.eof
propcode1= objRS2("propcode") %>


<option <% if propcode_list= propcode1 then %> selected<% end if %> value="<%= propcode1 %>"><%= propcode1 %></option>

<%
objRS2.MoveNext
loop
end if
%>


</select>

<input type="submit" value="Submit">
</form>

<%

response.write (propcode2)
response.write "<BR>"
response.write (proptitle2)

%>[/HTML]


Please help me out..........I really need it on urgent basis.....

Thanks
Deepak
May 4 '07 #1
1 1731
objRS is emptry. You should check objRS in stead of objRS2

Expand|Select|Wrap|Line Numbers
  1. // if objRS2.recordcount = 0
  2. if objRS.recordcount = 0 then  
  3. response.write "No records found"
  4. else
  5. propcode2 = objRS("propcode")
  6. proptitle2=objRS("proptitle")
  7. end if
May 6 '07 #2

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

Similar topics

3
by: Allan | last post by:
I use select @@identity to return @@identity from my store procedure, but I could not retrive it from my Visual basic code, like variable= oRS.fields.item(0).value, it always says item can not be...
1
by: TdarTdar | last post by:
Hello, what is the code to get the running applications "ApplicationId" Thanks Tdar
2
by: Gian Paolo | last post by:
Hi all on .net 2.0 i have a dataset and a table with some rows. Is there a way to retrive the current row index ? So i can retrive other value of that column... something like...
0
by: avishekb | last post by:
can anyone suggest me how to retrive data from a xml file using c/c++. for example: <schema> <applt to>portno</applyto> <type>int</type> <value>8080</value> </schema> i want to retrive the...
0
nehashri
by: nehashri | last post by:
hi, I need one help regarding Asp with MsAccess database. Problem. ======== i want to retrive stored image from the MSAccess database using asp.
2
idsanjeev
by: idsanjeev | last post by:
hello how can retrive the input text after submit button pressed and report a error message. i wants to post topic and if any error message is occured then retrive the inputed text but it forget its...
1
idsanjeev
by: idsanjeev | last post by:
hello i wants to retrive data in textarea like input text but in textarea value is not work so what should be use to retrive textarea value after any error <input type="text" name="name"...
10
by: arial | last post by:
Hi all, I need some help on retrive the value from query string. I have two web forms. One has the datagridview which displays the data from database. On one of the column I made a hyperlink to...
1
by: abirami elango | last post by:
Hi, i have created a web application in vb.net. i have assigned a value to the textbox during page UNLOAD event as below.. ......... Protected Sub Page_Unload(ByVal sender As Object, ByVal e As...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...

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.