 |
| 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
|
|
|
|

October 4th, 2004, 04:02 AM
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

October 4th, 2004, 04:50 AM
|
|
Friend of Wrox
|
|
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hello,
You try including adovb.inc at the top and then
rs.Open strSQL,cn,adOpenStatic,adLockReadOnly
-------
Rajani
|
|

October 4th, 2004, 09:38 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hey,
You can't have ,, must put in a value.
Brian
|
|

October 4th, 2004, 11:58 AM
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|
|

October 4th, 2004, 01:44 PM
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|
|

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

October 4th, 2004, 03:07 PM
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Didn't work Brian
|
|

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

October 4th, 2004, 03:16 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hey,
Have you confirmed that Request.Querystring("bookid") is returning a valid value?
Brian
|
|

October 4th, 2004, 04:47 PM
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|
 |