Ask a Question related to ASP Database, Design and Development.
-
Kevin #1
recordset not writing to page
Hi,
Access2000 db, w2k, iis5
I am trying to write a couple recordsets to a page and the page doesn't
throw an error, but it doesn't actualy write the data either -- just the
intervening html. Can anyone spot my error -- I've been looking at it over
an hour now, changing this and that -- and still nothing.
================================================== =========
<% @Language=VBScript %>
<% Option Explicit %>
<%
Dim cnnSimple ' ADO connection
Dim rstRnd1 ' ADO recordset
Dim rstRnd2 ' ADO recordset
Dim rstRnd3 ' ADO recordset
Dim strDBPath ' path to database (*.mdb) file
%>
<!-- #include virtual="/xxx/scripts/wwflData.asp" -->
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0">
<TR>
<TD COLSPAN="3"><IMG SRC="../../images/blank.gif" height=1 width=450></TD>
</TR>
<%
Set rstRnd1 = cnnSimple.Execute("SELECT * FROM qryWWFLDraft2003 WHERE rnd=1
ORDER BY pick")
Do While Not rstRnd1.EOF
%>
<TR>
<TD> </TD>
<TD NOWRAP class="name"><%= rstRnd1.Fields("overall").Value %></TD>
<TD><%= rstRnd1.Fields("wwflName").Value %></TD>
</TR>
<%
rstRnd1.MoveNext
Loop
rstRnd1.Close
Set rstRnd1 = Nothing
%>
<TR>
<TD COLSPAN="3"><IMG SRC="../../images/blank.gif" height=1 width=450></TD>
</TR>
<TR>
<TH COLSPAN="3">Round Two</TH >
</TR>
<%
Set rstRnd2 = cnnSimple.Execute("SELECT wwflName FROM qryWWFLDraft2003
WHERE rnd=2 ORDER BY pick")
Do While Not rstRnd2.EOF
%>
<TR>
<TD> </TD>
<TD NOWRAP class="name"><%= rstRnd2.Fields("overall").Value %></TD>
<TD><%= rstRnd2.Fields("wwflName").Value %></TD>
</TR>
<%
rstRnd2.MoveNext
Loop
rstRnd2.Close
Set rstRnd2 = Nothing
%>
<TR>
<TD COLSPAN="3"><IMG SRC="../../images/blank.gif" height=1 width=450></TD>
</TR>
<TR>
<TH COLSPAN="3">Round Three</TH >
</TR>
<%
Set rstRnd3 = cnnSimple.Execute("SELECT rnd, pick, overall, wwflName FROM
qryWWFLDraft2003 WHERE rnd=3 ORDER BY pick")
Do While Not rstRnd3.EOF
%>
<TR>
<TD> </TD>
<TD NOWRAP class="name"><%= rstRnd3.Fields("overall").Value %></TD>
<TD><%= rstRnd3.Fields("wwflName").Value %></TD>
</TR>
<%
rstRnd3.MoveNext
Loop
rstRnd3.Close
Set rstRnd3 = Nothing
%>
</TABLE>
<%
cnnSimple.Close
Set cnnSimple = Nothing
%>
Kevin Guest
-
Recordset page navigation
Hi , I have a page that get 1000 records and I?m displaying it 10 records a page. I want to use page numbers line 1,2,3, ...as my navigation instead... -
recordset paging won't show second page
Hi I'm querying a database and returning the records using absolute page and all that stuff. The user can choose to do a keyword search or... -
Recordset elements failing to write to page
I've got what I'm sure is a very simple problem. In an ASP page, I am trying to write out 4 fields from a recordset in succession: Response.Write... -
writing to a page after it has loaded
I have been trying to find out how write to a page after it has loaded.. I have written an application to control pppd on our server and need to... -
Writing HTML Page
Hi, just create an empty ASPX page with no codebehind file. Then place your code inside the page (inside <% ... %> of course) and use... -
Ray at #2
Re: recordset not writing to page
Does your query return any records? Do you have an "on error resume next"
anywhere? What happens if you just query "select * from theTable" to verify
that you get some records without a where clause? How about if you do:
<td><%=rstRnd1.Fields("overall").value & " that should be the value
there"%></td>
Ray at home
"Kevin" <thersitz @yahoo com> wrote in message
news:eo9u7KtVDHA.652@tk2msftngp13.phx.gbl...> Hi,
>
> Access2000 db, w2k, iis5
>
> I am trying to write a couple recordsets to a page and the page doesn't
> throw an error, but it doesn't actualy write the data either -- just the
> intervening html. Can anyone spot my error -- I've been looking at it over
> an hour now, changing this and that -- and still nothing.
>
> ================================================== =========
>
> <% @Language=VBScript %>
> <% Option Explicit %>
> <%
Ray at Guest
-
Kevin #3
Re: recordset not writing to page
the query works fine in access
i don't have an error resume next
i have pared it down to one recordset and tried and no go. the really weird
part is I have another page with basically the same recordset and it works.
i have css and stuff in the full page -- but i can't see that as being the
problem.
i can tell that it grabs the data -- because no error shows -- i can change
a field to a non-existent field and it throws the error. I can change the
html and it writes.
i don't get it.
thanks for your help Ray.
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:OICfERtVDHA.2228@TK2MSFTNGP12.phx.gbl...verify> Does your query return any records? Do you have an "on error resume next"
> anywhere? What happens if you just query "select * from theTable" toover> that you get some records without a where clause? How about if you do:
>
> <td><%=rstRnd1.Fields("overall").value & " that should be the value
> there"%></td>
>
>
> Ray at home
> "Kevin" <thersitz @yahoo com> wrote in message
> news:eo9u7KtVDHA.652@tk2msftngp13.phx.gbl...> > Hi,
> >
> > Access2000 db, w2k, iis5
> >
> > I am trying to write a couple recordsets to a page and the page doesn't
> > throw an error, but it doesn't actualy write the data either -- just the
> > intervening html. Can anyone spot my error -- I've been looking at it>> > an hour now, changing this and that -- and still nothing.
> >
> > ================================================== =========
> >
> > <% @Language=VBScript %>
> > <% Option Explicit %>
> > <%
>
Kevin Guest
-
Ray at #4
Re: recordset not writing to page
What about in a view-source? Do you see the values there?
Ray at work
"Kevin" <thersitz @yahoo com> wrote in message
news:upncVctVDHA.3924@tk2msftngp13.phx.gbl...weird> the query works fine in access
>
> i don't have an error resume next
>
> i have pared it down to one recordset and tried and no go. the reallyworks.> part is I have another page with basically the same recordset and itchange>
> i have css and stuff in the full page -- but i can't see that as being the
> problem.
>
> i can tell that it grabs the data -- because no error shows -- i can> a field to a non-existent field and it throws the error. I can change the
> html and it writes.
>
> i don't get it.
>
> thanks for your help Ray.
Ray at Guest
-
Kevin #5
Re: recordset not writing to page
No, it is not even writing the html for lines like this:
<TR>
<TD> </TD>
<TD NOWRAP class="name"><%= rstRnd1.Fields("overall").Value %></TD>
<TD><%= rstRnd1.Fields("wwflName").Value %></TD>
</TR>
below is the source for this call --- Set rstRnd1 =
cnnSimple.Execute("SELECT overall, wwflName FROM qryWWFLDraft2003 WHERE
rnd=1 ORDER BY pick") --- :
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0">
<TR>
<TH class="qb" width=1> </TH>
<TH class="qb" width=10>Pick</TH>
<TH class="qb" width=100>wwfl Team</TH>
</TR>
<TR>
<TD COLSPAN="3"><IMG SRC="../../images/blank.gif" height=1 width=450></TD>
</TR>
<TR>
<TD COLSPAN="3"><IMG SRC="../../images/blank.gif" height=1 width=450></TD>
</TR>
</TABLE>
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:O8DgugtVDHA.1984@TK2MSFTNGP11.phx.gbl...the> What about in a view-source? Do you see the values there?
>
> Ray at work
>
> "Kevin" <thersitz @yahoo com> wrote in message
> news:upncVctVDHA.3924@tk2msftngp13.phx.gbl...> weird> > the query works fine in access
> >
> > i don't have an error resume next
> >
> > i have pared it down to one recordset and tried and no go. the really> works.> > part is I have another page with basically the same recordset and it> >
> > i have css and stuff in the full page -- but i can't see that as beingthe> change> > problem.
> >
> > i can tell that it grabs the data -- because no error shows -- i can> > a field to a non-existent field and it throws the error. I can change>> > html and it writes.
> >
> > i don't get it.
> >
> > thanks for your help Ray.
>
Kevin Guest
-
Kevin #6
solved it Ray
Thanks for all your help Ray. I appreciate it.
The problem was my where statement. I had a field named "rnd" in the table,
which was okay in the other page I have because I wasn't calling it from the
where clause -- but in the page in which I was using a Where clause the
field name "rnd" must be confusing it with a function or something -- is the
random function keyword rnd?
Any way, I changed the field name to round in the table and the query and my
page and it works fine. What a drag all that was -- even tho I am able to
grin now.
thanks again.
"Kevin" <thersitz @yahoo com> wrote in message
news:eo9u7KtVDHA.652@tk2msftngp13.phx.gbl...width=450></TD>> Hi,
>
> Access2000 db, w2k, iis5
>
> I am trying to write a couple recordsets to a page and the page doesn't
> throw an error, but it doesn't actualy write the data either -- just the
> intervening html. Can anyone spot my error -- I've been looking at it over
> an hour now, changing this and that -- and still nothing.
>
> ================================================== =========
>
> <% @Language=VBScript %>
> <% Option Explicit %>
> <%
> Dim cnnSimple ' ADO connection
> Dim rstRnd1 ' ADO recordset
> Dim rstRnd2 ' ADO recordset
> Dim rstRnd3 ' ADO recordset
> Dim strDBPath ' path to database (*.mdb) file
> %>
>
> <!-- #include virtual="/xxx/scripts/wwflData.asp" -->
>
> <TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0">
>
> <TR>
> <TD COLSPAN="3"><IMG SRC="../../images/blank.gif" height=1rnd=1> </TR>
> <%
> Set rstRnd1 = cnnSimple.Execute("SELECT * FROM qryWWFLDraft2003 WHEREwidth=450></TD>> ORDER BY pick")
> Do While Not rstRnd1.EOF
> %>
> <TR>
> <TD> </TD>
> <TD NOWRAP class="name"><%= rstRnd1.Fields("overall").Value %></TD>
> <TD><%= rstRnd1.Fields("wwflName").Value %></TD>
> </TR>
> <%
> rstRnd1.MoveNext
> Loop
> rstRnd1.Close
> Set rstRnd1 = Nothing
> %>
> <TR>
> <TD COLSPAN="3"><IMG SRC="../../images/blank.gif" height=1width=450></TD>> </TR>
> <TR>
> <TH COLSPAN="3">Round Two</TH >
> </TR>
> <%
> Set rstRnd2 = cnnSimple.Execute("SELECT wwflName FROM qryWWFLDraft2003
> WHERE rnd=2 ORDER BY pick")
> Do While Not rstRnd2.EOF
> %>
> <TR>
> <TD> </TD>
> <TD NOWRAP class="name"><%= rstRnd2.Fields("overall").Value %></TD>
> <TD><%= rstRnd2.Fields("wwflName").Value %></TD>
> </TR>
> <%
> rstRnd2.MoveNext
> Loop
> rstRnd2.Close
> Set rstRnd2 = Nothing
> %>
> <TR>
> <TD COLSPAN="3"><IMG SRC="../../images/blank.gif" height=1> </TR>
> <TR>
> <TH COLSPAN="3">Round Three</TH >
> </TR>
> <%
> Set rstRnd3 = cnnSimple.Execute("SELECT rnd, pick, overall, wwflName FROM
> qryWWFLDraft2003 WHERE rnd=3 ORDER BY pick")
> Do While Not rstRnd3.EOF
> %>
> <TR>
> <TD> </TD>
> <TD NOWRAP class="name"><%= rstRnd3.Fields("overall").Value %></TD>
> <TD><%= rstRnd3.Fields("wwflName").Value %></TD>
> </TR>
> <%
> rstRnd3.MoveNext
> Loop
> rstRnd3.Close
> Set rstRnd3 = Nothing
> %>
> </TABLE>
> <%
> cnnSimple.Close
> Set cnnSimple = Nothing
> %>
>
>
Kevin Guest



Reply With Quote

