Wrox Programmer Forums
|
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
 
Old October 4th, 2004, 04:02 AM
Registered User
 
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default No value given for one or more required parameters

Guys,

I'm getting this error and I'm not able to find the source of this problem. The weird thing about this error is that it doesn't happen constanly. It works fine and after a few clicks then it start giving me the following:

Description: No value given for one or more required parameters.
Number: -2147217904
Source: Microsoft JET Database Engine

Now this is what I have on the SQL after putting a response.write:
SELECT * FROM books WHERE isbn LIKE '020533167x'

And the code look like this:

strSQL = "SELECT * FROM books WHERE isbn LIKE '" & Request.QueryString("bookId") & "'"
moRs.Open strSQL,cn,3,,1

Guys, your help will be highly appreciated. This error is been keeping awake all night long.
Thank you.
 
Old October 4th, 2004, 04:50 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello,

  You try including adovb.inc at the top and then


rs.Open strSQL,cn,adOpenStatic,adLockReadOnly




-------
Rajani

 
Old October 4th, 2004, 09:38 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

You can't have ,, must put in a value.

Brian
 
Old October 4th, 2004, 11:58 AM
Registered User
 
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Brian!

thank you for your comments. The reason I left that parameter empty is because is an optional parameter, but I'll try. I think that it'll fail all the time in that case, but is just occasionally that happens.

Quote:
quote:Originally posted by bmains
 Hey,

You can't have ,, must put in a value.

Brian
 
Old October 4th, 2004, 01:44 PM
Registered User
 
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Brian,

I tried without the empty space and still didn't work. See bellow:


moRs.Open strSQL,cn,3

Any other suggestions?

Rajani, I appreciate your comments also, but instead of including the whole adovb.inc, I will just declare a couple of variables that I need. I don't like overloading all those variables into my page.

thank you,

Vlado

Quote:
quote:Originally posted by bmains
 Hey,

You can't have ,, must put in a value.

Brian
 
Old October 4th, 2004, 02:33 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Try 3,3
 
Old October 4th, 2004, 03:07 PM
Registered User
 
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Didn't work Brian

 
Old October 4th, 2004, 03:15 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Same error as before? That's strange...
 
Old October 4th, 2004, 03:16 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Have you confirmed that Request.Querystring("bookid") is returning a valid value?

Brian
 
Old October 4th, 2004, 04:47 PM
Registered User
 
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I know it's strange one. I'm very good catching error, but this one it's surprising me. I think that it has to do with the engine in the server.
The value is like I stated before: SELECT * FROM books WHERE isbn LIKE '020533167x'

Now I have changed all my connection by this one and then I will tested thorougly. Like I said it only happens occasionally. Here's my new code to eliminate the SQL.

moRs.Open "books", cn1, adOpenKeyset, adLockReadOnly
moRs.Find "isbn = '" & Request.QueryString("bookId") & "'"

thank you,

Vlado






Similar Threads
Thread Thread Starter Forum Replies Last Post
Some help required ! codenet C# 2005 1 September 24th, 2007 04:01 PM
No value given for one or more required parameters ableton ADO.NET 2 July 18th, 2006 02:12 AM
No value given for one or more required parameters djatsii Classic ASP Databases 16 January 4th, 2006 05:49 PM
No value given for one or more required parameters imercha Classic ASP Databases 1 December 21st, 2005 06:44 PM
No value given for one or more required parameters nidy_online ADO.NET 1 June 27th, 2004 09:44 AM





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