Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Help needed.. PLEASE??
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Help needed.. PLEASE??

 Post Reply Post Reply
Author
Sandman_nz View Drop Down
Newbie
Newbie
Avatar

Joined: 13 May 2003
Location: New Zealand
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sandman_nz Quote  Post ReplyReply Direct Link To This Post Topic: Help needed.. PLEASE??
    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.

Back to Top
Ignorance View Drop Down
Newbie
Newbie


Joined: 23 February 2003
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ignorance Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
Sandman_nz View Drop Down
Newbie
Newbie
Avatar

Joined: 13 May 2003
Location: New Zealand
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sandman_nz Quote  Post ReplyReply Direct Link To This Post 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....



Edited by Sandman_nz
Back to Top
Sandman_nz View Drop Down
Newbie
Newbie
Avatar

Joined: 13 May 2003
Location: New Zealand
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sandman_nz Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2003 at 8:59pm

Consider me stupid...

i had this line wrong..

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

Should have been...

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

Thanks anyway...

 

Back to Top
Ignorance View Drop Down
Newbie
Newbie


Joined: 23 February 2003
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ignorance Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2003 at 9:00pm

I take it the connection was in the include?

Back to Top
Sandman_nz View Drop Down
Newbie
Newbie
Avatar

Joined: 13 May 2003
Location: New Zealand
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sandman_nz Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2003 at 9:02pm
correct
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.