Print Page | Close Window

Help needed.. PLEASE??

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=2685
Printed Date: 29 March 2026 at 7:47pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Help needed.. PLEASE??
Posted By: Sandman_nz
Subject: Help needed.. PLEASE??
Date Posted: 13 May 2003 at 8:47pm

Can anyone see a problem with this??

 sql = "SELECT * FROM ads WHERE id = " & int(Request.Form("adid"))
Set objRec = Server.CreateObject("ADODB.Recordset")
objRec.Open sql, conn, 3, 3

I cant... but i get this error...

ADODB.Recordset error '800a0bb9'

The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.

/ad/admin/save_changes.asp, line 5

Line 5 being the objRec.open... line

Any help would be much appreciated.



-------------
whee



Replies:
Posted By: Ignorance
Date Posted: 13 May 2003 at 8:55pm

Not real sure but isn't int(Request.Form("adid")) supposed to be cint(Request.Form("adid")) ? Provided the field "id" is actually numeric. Also, you did create and initialize your connection "conn" right?



Posted By: Sandman_nz
Date Posted: 13 May 2003 at 8:55pm

Yes, conn is set up... code below...

Dim conn, ConnectString
ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("/ad/admin/db/database.mdb") & ";Persist Security Info=False"
Set conn = Server.CreateObject("ADODB.Connection")
conn.open ConnectString

I tried cint and still not fixed....



-------------
whee


Posted By: Sandman_nz
Date Posted: 13 May 2003 at 8:59pm

Consider me stupid...

i had this line wrong..

<!--include file=.....-->

Should have been...

<!--#include file=.....-->

Thanks anyway...

 



-------------
whee


Posted By: Ignorance
Date Posted: 13 May 2003 at 9:00pm

I take it the connection was in the include?



Posted By: Sandman_nz
Date Posted: 13 May 2003 at 9:02pm
correct

-------------
whee



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net