Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 30th, 2006, 05:14 AM
Authorized User
 
Join Date: Aug 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADODB.Recordset error '800a0bb9'

Hi,

Need your help please.I am getting the following error:

ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/mhld/information/ASP/ASP Learning/First DNAs.asp, line 14

[u]First Page code:</u>

<html>

<body>

<form action="http://nww.ncumbria.nhs.uk/mhld/information/ASP/ASP Learning/First DNAs.asp" method="post">

<p> Outpatient Report:</p>

First DNAS:
<input type="radio" name="OPR"
value="select main_spect, attnd_month, pcg, sum(op_first_dnas)as sum from pims.vw_op_first_dnas where attnd_month>'2005/06'group by main_spect, attnd_month, pcg" checked="checked"></input>
<br>

Follow up DNAS:
<input type="radio" name="OPR"
value="select main_spect, attnd_month, pcg, sum(op_follow_up_dnas)as sum from pims.vw_op_followup_dnas where attnd_month>'2005/06' group by main_spect, attnd_month, pcg"></input>
<br>

First Attendances:
<input type="radio" name="OPR"
value="select main_spect, attnd_month, pcg, sum(op_first_atts_seen)as sum from pims.vw_op_first_atts where attnd_month>'2005/06' group by main_spect, attnd_month, pcg"></input>
<br>

Follow up Attendances:
<input type="radio" name="OPR"
value="select main_spect, attnd_month, pcg, sum(op_followup_atts_seen)as sum from pims.vw_op_followup_atts where attnd_month>'2005/06' group by main_spect, attnd_month, pcg"></input>
<br><br>

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

</body>
</html>

[u]Main Page Code:</u>
<HTML>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=windows-1252">
<TITLE>ONE ASP DNAS/ATTENDACES - Ongoing </TITLE>
<BODY>

<%
    Dim paraval
    paraval = Request.Form("OPR")

    Set conn = Server.CreateObject("ADODB.Connection")
    conn.open "PIMSP_MHLD","REPORT","REPORT"

    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open sql, conn, 3, 3

sql= " '" & paraval & "' "

%>

<TABLE BORDER=1 BGCOLOR=#ffffff CELLSPACING=0><CAPTION><B> DNAS / ATTENDACES - Ongoing</B></CAPTION>

<THEAD>
<TR>
<TH BGCOLOR=#3399B7 BORDERCOLOR=#000000 >MAIN_SPECT</TH>
<TH BGCOLOR=#3399B7 BORDERCOLOR=#000000 >ATTND_MONTH</TH>
<TH BGCOLOR=#3399B7 BORDERCOLOR=#000000 >PCG</TH>
<TH BGCOLOR=#3399B7 BORDERCOLOR=#000000 >SUM</TH>
</TR>
</THEAD>

<TBODY>

<%
On Error Resume Next
rs.MoveFirst
do while Not rs.eof
%>

<TR VALIGN=TOP>
<TD BGCOLOR=#7BB1C6 BORDERCOLOR=#c0c0c0 ><B><%=(rs.Fields("MAIN_SPECT"))%><BR></B></TD>
<TD BGCOLOR=#7BB1C6 BORDERCOLOR=#c0c0c0 ><B><%=(rs.Fields("ATTND_MONTH"))%><BR></B></TD>
<TD BGCOLOR=#7BB1C6 BORDERCOLOR=#c0c0c0 ><B><%=(rs.Fields("PCG"))%><BR></B></TD>
<TD BGCOLOR=#7BB1C6 BORDERCOLOR=#c0c0c0 ><B><%=(rs.Fields("SUM"))%><BR></B></TD>
</TR>

<%
rs.MoveNext
loop
rs.close
conn.close
set rs = nothing
set conn = nothing
%>

</TBODY>
<TFOOT></TFOOT>
</TABLE>
</BODY>
</HTML>

Thanks in Advance.

Thamil


 
Old August 30th, 2006, 10:07 AM
Authorized User
 
Join Date: Feb 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

.. line 14 is ?

steweb




Visit my web site !
www.steweb.net
 
Old August 31st, 2006, 06:11 AM
Authorized User
 
Join Date: Aug 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I got it work. I made a error in ASP script structure.

Line 14 is rs.open sql

Thanks very much.

Thanks

 
Old October 5th, 2006, 04:01 AM
Registered User
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You have got a major security breach waiting to happen in your code.

You are showing all your SQL Constructs on the client side by placing them in the values of the radio buttons.

You have now left yourself wide open to SQL Injection Attacks.






Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Recordset error '800a0bb9' - PLEASE HELP! gmoney060 BOOK: Beginning ASP 3.0 3 April 25th, 2007 09:21 PM
ADODB.RecordSet -- Error nabeeljohn Classic ASP Professional 10 November 9th, 2006 05:23 AM
ADODB.Recordset error '800a0bb9' Line 24 rossdunbar Dreamweaver (all versions) 3 August 2nd, 2004 10:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.