 |
| Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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
|
|
|
|

August 18th, 2005, 04:25 PM
|
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Error in ADODB.Recordset (0x800A0BB9)
Hi To all.
the code below is moving the cursor of my recordset but I got an error "ADODB.Recordset (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another." I tried different cobination for my CURSOR TYPE and LOCK TYPE. but still i got an error.
Appreciate your help.
Thanks
Rylemer.
<html>
<head>
<title>MyTest</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("/pdmi/protrack/db/ProTrack.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
sql="SELECT MailCount, PageCount, Div FROM ProTrack Order By Div"
rs.Open sql, conn, 3, 3
%>
<form name="form1" method="post" action="">
<table width="60%" border="1">
<tr>
<td width="160"><div align="center"><strong>Mail
Count</strong></div></td>
<td width="222"><div align="center"><strong>Page
Count</strong></div></td>
<td width="182"><div align="center"><strong>Division</strong></div></td>
</tr>
<%
Do Until rs.eof
PreviousDiv = rs("Div")
rs.MoveNext
CurrentDiv = rs("Div")%>
%>
<tr>
<td height="22"><%=rs("MailCount")%></td>
<td height="22"><%=rs("PageCount")%></td>
<td height="22"><strong><%=rs("Div")%></strong></td>
<%
rs.MoveNext%>
</tr>
<tr>
<td height="22"><%=TotMailCount%></td>
<td height="22"> </td>
<td height="22"> </td>
</tr>
<%Loop
rs.close
conn.close
%>
</table>
</form>
</body>
</html>
|
|

August 22nd, 2005, 08:02 AM
|
|
Authorized User
|
|
Join Date: Jan 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Try the query "sql" in Query Analyzer.If it runs properly then
try the foll one:
rs.Open sql, conn, 1,2
I think these shd solve your problem.
Otherwise:
mark the line where u get errors.
Ashwin S.Kenkare
Programmer
CMI
|
|

August 23rd, 2005, 05:56 AM
|
|
Authorized User
|
|
Join Date: Aug 2005
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
check for the line in ur code
conn.Open(Server.Mappath("/pdmi/protrack/db/ProTrack.mdb"))
as it is working at my end where i created db at my local and given its path directly without Server.Mappath
Quote:
quote:Originally posted by askenkray
Try the query "sql" in Query Analyzer.If it runs properly then
try the foll one:
rs.Open sql, conn, 1,2
I think these shd solve your problem.
Otherwise:
mark the line where u get errors.
Ashwin S.Kenkare
Programmer
CMI
|
|
|

November 9th, 2006, 05:06 AM
|
|
Registered User
|
|
Join Date: Nov 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi to all! Can someone help me with my code?
I've been trying to fix it for two days and nothing happened.
It always gives me the same error:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
And it says that there is something wrong with line 4.
I am using two files here. The first one is an asp file (expprof.asp) which includes a database connection file (<!--#include file="dbconnect.asp">). And another file (expeduc.asp) which is also included in the first file (<!--#include file="expeduc.asp">).
What I want is for expeduc.asp to display information from the database, that is, if the database contains the "id" of the person displayed in expprof.asp, otherwise, display an ADD form to add information related again, to the person displayed in expprof.asp
<%
Set rsNum = Server.CreateObject("ADODB.Recordset")
numSQL = "select * from educations where exp_id = " & Request.QueryString("id") & ";"
rsNum.Open numSQL, adoCon, 3, 3 ---> this line is said to have the error
'count the number of records the person has in the educations table
cnt = rsNum.RecordCount
'if there are no records then the system must require the user to enter the information in the form below
If (cnt < 1) Then
%>
<form name="addeduc" action="expeduc.asp?inc=1&id=<% Request.QueryString("id") %>&view=1" method="post">
<table align="center">
<tr><td align="center" colspan="2">Education</td></tr>
<tr><td colspan="2"></td></tr>
<tr>
<td>Education:</td>
<td><input type="text" name="educ" size="30"></td>
</tr>
<tr><td colspan="2" align="center"><input type="submit" name="Submit" value="Add"></td></tr>
</table>
</form>
<%
Set rsEduc = Server.CreateObject("ADODB.Recordset")
educSQL = "select * from educations"
rsEduc.Open educSQL, adoCon, 2, 3
rsEduc.AddNew
rsEduc.Fields("exp_id") = Request.QueryString("id")
rsEduc.Fields("education") = Request.Form("educ")
rsEduc.Update
'rsEduc.Close
'Response.Redirect("expeduc.asp")
'Response.Write("Add Something")
Else
'display the Education when there is a record found in the database
Response.Write(rsNum.Fields(2))
End If
%>
|
|
 |