navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

ADODB.Field error ' 80020009'

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> ADODB.Field error ' 80020009'
Page: [1]
 
hdreamz

 

Posts: 9
Joined: 11/3/2002
Status: offline

 
ADODB.Field error ' 80020009' - 11/3/2002 7:54:07   
<%
dim Conn1, cql1
cql1=" SELECT Category FROM cat WHERE Channel=' Automobiles' ;"
set Conn1=Server.CreateObject(" ADODB.Recordset" )
Conn1.Open cql1, " DSN=eau"
%>
<table border=" 0" cellpadding=" 0" cellspacing=" 0" width=" 100%" >

<%
Do While NOT Conn1.EOF
%>
<tr>
<td width=" 50%" ><img border=" 0" src=" ../../img/but-gr.gif" >
<font face=" Arial, helvetica" size=" 2" ><%=Conn1(" Category" )%></font></td>
<%
Conn1.MoveNext
%>
<td width=" 50%" ><img border=" 0" src=" ../../img/but-gr.gif" >
<font face=" Arial, helvetica" size=" 2" ><%=Conn1(" Category" )%></font><font size=" 2" ></font></td>
</tr>
<%
Conn1.MoveNext
%>
<%
loop
Conn1.Close
set Conn1=nothing
%>

</table>

The above is my code and its creating the result as displaying 5 results.
but in the end it goes to result number six (there are only 5 matching records) and gives message

" ADODB.Field error ' 80020009'

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

? "

could some one help please

Seventh

 

Posts: 1235
Joined: 8/4/2002
From: The Motor City
Status: offline

 
RE: ADODB.Field error ' 80020009' - 11/3/2002 8:14:21   
Welcome to OutFront, hdreamz!

These should help you out. It seems that this is a pretty common error.

#1. p2p.wrox.com

#2. Microsoft Knowledge Base - ASP

_____________________________

"go forth and create."

(in reply to hdreamz)
hdreamz

 

Posts: 9
Joined: 11/3/2002
Status: offline

 
RE: ADODB.Field error ' 80020009' - 11/3/2002 12:47:17   
:)
that doest help. i got the problem... but i need solution.

the results is in this form:

Record 1 Record 2
Record 3 Record 4
Record 5 ERROR MESSAGE HERE

could some one help me please.


(in reply to hdreamz)
Spooky

 

Posts: 26597
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: ADODB.Field error ' 80020009' - 11/3/2002 13:55:37   
Im not sure why you want to Conn1.MoveNext twice?
This should suffice:
<% 
Do While NOT Conn1.EOF 
%> 
<tr> 
<td width=" 50%" ><img border=" 0"  src=" ../../img/but-gr.gif" > 
<font face=" Arial, helvetica"  size=" 2" ><%=Conn1(" Category" )%></font></td> 
<% 
Conn1.MoveNext 
%> 
<% 
loop 


_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to hdreamz)
hdreamz

 

Posts: 9
Joined: 11/3/2002
Status: offline

 
RE: ADODB.Field error ' 80020009' - 11/4/2002 3:12:33   
u see am displaying results not in one row.

i want results in two rows
its like this

1 ... 2
3 ... 4
5

like that. ofcourse in a table.

how to do that?

(in reply to hdreamz)
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: ADODB.Field error ' 80020009' - 11/4/2002 14:41:36   
Haven' t tested this code specifically, but I' ve done things like that many times. This is how I' d do it....

<% 
dim Conn1, cql1, t
cql1=" SELECT Category FROM cat WHERE Channel=' Automobiles' ;"  
set Conn1=Server.CreateObject(" ADODB.Recordset" ) 
Conn1.Open cql1, " DSN=eau"  
t = 0

' Check for no records
IF  Conn1.eof THEN
   response.write " Your ID does not match any entries.<br>Please report the following:<br>"  & cql1 & " <br>To the database administrator..." 
	Conn1.close
	set Conn1=nothing
ELSE
%> 
<table border=" 0"  cellpadding=" 0"  cellspacing=" 0"  width=" 100%" ><tr>
<%
DO WHILE NOT Conn1.EOF%>

<td width=" 50%" ><img border=" 0"  src=" ../../img/but-gr.gif" > 
<font face=" Arial, helvetica"  size=" 2" ><%=Conn1(" Category" )%></font></td>

<%
	t = t + 1
	IF t=2 THEN
		Response.Write(" </tr><tr>" )
		t = 0
	END IF
LOOP

	' Fill last table cell if necessary
	IF t = 1 THEN
		Response.Write(" <td> </td></tr>" )
	ELSE
		Response.Write(" </tr>" )
	END IF

Conn1.close
set Conn1=nothing
END IF
%>


Hope it helps...

EDIT: Typo' s

< Message edited by rdouglass -- 11/4/2002 2:43:44 PM >

(in reply to hdreamz)
hdreamz

 

Posts: 9
Joined: 11/3/2002
Status: offline

 
RE: ADODB.Field error ' 80020009' - 11/5/2002 3:17:53   
hi rdouglass
thanks for responding.... BUT

your solution lists in one column.

what i want is results in TWO COLUMNS, never mind how many rows... but it should be in 2 columns.

can u please help me for this with above code. please..

say there are matching 5 records. then it should display as
quote:


1 2
3 4
5

ofcourse that in a table.

thanks in advance

(in reply to hdreamz)
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: ADODB.Field error ' 80020009' - 11/5/2002 8:09:06   
Actually, if you look closely at the code, it does do two columns. If you look at the variable " t" and follow it thru, you' ll see that it starts with 0. We then start a row (<tr>) and write a column. Then add 1 to " t" . Then write another column, then add another 1 to " t" (" t" now = 2). Then:

IF t=2 THEN
Response.Write(" </tr><tr>" )
t = 0
END IF


If " t = 2" then close the row and start another row. The code after " LOOP" checks to see if there is only 1 column drawn. If there is only 1 column, then write another blank column and close the row. If " t <> 1" then just close the row.

Did you follow that??

This method does work and I use it quite often. Give it a try - I' m quite confident its what you' re looking for.....

< Message edited by rdouglass -- 11/5/2002 8:09:32 AM >

(in reply to hdreamz)
g-john

 

Posts: 106
Joined: 1/1/2002
From:
Status: offline

 
RE: ADODB.Field error ' 80020009' - 11/27/2002 8:17:16   
hi rdouglass

ok it worked thanks...

BUT AGAIN...

could u guide me for 3 column style... i tried myself.. but failed. i guess once u show me 3 column way.. i will be able to do more.

(in reply to hdreamz)
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: ADODB.Field error ' 80020009' - 11/27/2002 9:03:45   
Basically you would change your column width (<td width=" 33%" >) and change the check for ' t' to

IF t=3 THEN

Also, you' ll have to alter the ' filler' code to something like:

IF t = 1 THEN
Response.Write(" <td> </td><td> </td></tr>" )
ELSE
IF t = 2 THEN
Response.Write(" <td> </td></tr>" )
ELSE
Response.Write(" </tr>" )
END IF
END IF

(If you do many columns, you may want to build a loop in place of the IF...THEN' s)

Essentially ' t' is the number of columns. Does that help?

(in reply to hdreamz)
g-john

 

Posts: 106
Joined: 1/1/2002
From:
Status: offline

 
RE: ADODB.Field error ' 80020009' - 11/27/2002 9:40:30   
quote:

(If you do many columns, you may want to build a loop in place of the IF...THEN' s)


could you pls show with example for loop if many columns.



< Message edited by g-john -- 11/27/2002 9:41:27 AM >

(in reply to hdreamz)
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: ADODB.Field error ' 80020009' - 11/27/2002 10:22:53   
Based on the code above, you could do something like this:

Add 2 variables to the DIM line; something like:

DIM Conn1, cql1, t, numberOfColumns, filler

Then set your column count and filler variables; let' s use 4:

numberOfColumns = 4 ' change to number of columns desired
filler = " "

Then we would change the fillup code so that we check ' t' to see when it equals number of columns:

IF t=numberOfColumns THEN

Then we' d use ' fillers' like so:

FOR x = t TO numberOfColumns
filler = filler & " <td>&nbsp;</td>"
NEXT

Response.write(filler & " </tr>" & vbcrlf)

The code that I posted above would now look something like:

<%
DIM Conn1, cql1, t, numberOfColumns, filler
cql1=" SELECT Category FROM cat WHERE Channel=' Automobiles' ;" 

set Conn1=Server.CreateObject(" ADODB.Recordset" )
Conn1.Open cql1, " DSN=eau" 
t = 0
numberOfColumns = 4
filler = " " 

' Check for no records
IF  Conn1.eof THEN
response.write " Your ID does not match any entries.<br>Please report the following:<br>"  & cql1 & " <br>To the database administrator..." 
Conn1.close
set Conn1=nothing

ELSE  %>

   <table border=" 0"  cellpadding=" 0"  cellspacing=" 0"  width=" 100%" ><tr>

<%
DO WHILE NOT Conn1.EOF%>

<td width=" 50%" ><img border=" 0"  src=" ../../img/but-gr.gif" >
<font face=" Arial, helvetica"  size=" 2" ><%=Conn1(" Category" )%></font></td>

<%
t = t + 1

IF t=numberOfColumns THEN
Response.Write(" </tr><tr>" )
t = 0
END IF
LOOP

' Fill last table cell(s) where necessary
IF t=0 THEN 
t=4
END IF

FOR x = t TO numberOfColumns
filler = filler & " <td>&nbsp;</td>" 
NEXT

Response.write(filler & " </tr>"  & vbcrlf)

Conn1.close
set Conn1=nothing  END IF  %>

(in reply to hdreamz)
vinod

 

Posts: 1
Joined: 12/14/2004
Status: offline

 
RE: ADODB.Field error ' 80020009' - 12/14/2004 19:03:37   
Try This



dim Conn1, cql1
cql1=" SELECT Category FROM cat WHERE Channel=' Automobiles' ;"
set Conn1=Server.CreateObject(" ADODB.Recordset" )
Conn1.Open cql1, " DSN=eau"
%>
<table border=" 0" cellpadding=" 0" cellspacing=" 0" width=" 100%" >

<%
Do While NOT Conn1.EOF
%>
<tr>
<td width=" 50%" ><img border=" 0" src=" ../../img/but-gr.gif" >
<font face=" Arial, helvetica" size=" 2" ><%=Conn1(" Category" )%></font></td>
<%
Conn1.MoveNext
%>
<td width=" 50%" ><img border=" 0" src=" ../../img/but-gr.gif" >
<font face=" Arial, helvetica" size=" 2" ><%=Conn1(" Category" )%></font><font size=" 2" ></font></td>
</tr>
<%
IF not Conn1.EOF then
Conn1.MoveNext
End if
%>
<%
loop
Conn1.Close
set Conn1=nothing

(in reply to hdreamz)
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: ADODB.Field error ' 80020009' - 12/15/2004 9:21:39   
Hi vinod and Welcome to Outfront.

Is this a question or just a comment? If question, can you rephrase it? ..for this is a 2 year old post and I suspect it has been resolved. :)

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to vinod)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> ADODB.Field error ' 80020009'
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts