Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
No value given for one or more required parameters. HELP!
Old 02-16-2006, 11:42 PM No value given for one or more required parameters. HELP!
Novice Talker

Posts: 8
Trades: 0
I am not a proficient asp programmer, though I (usually get by). But today I have a problem. Any help would be GREATLY appreciated.

I have a simple website linking to an access database. The script works fine on my local machine. And it works fine on my regular host. However, I have uploaded the website to a Windows account with GoDaddy and here is my problem.

I am receiving the following error:

Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
/home.asp, line 10

- the WEIRD thing is that if you hit refresh enough times, the page loads fine. Then, at random (it appears), the error resurfaces. No coding changes at all.

Line 10 is in red below:

<% @Language=VBScript %> <!--#include file="dbasepath.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<%
set dBaseConn = Server.CreateObject("adodb.connection")
set rs = server.createobject("adodb.recordset")
strConn = "Provider=Microsoft.JET.OLEDB.4.0; Data Source = " & dBasePath & ";"
dBaseConn.open strConn
strSQL = "SELECT * FROM Content where id=10"
rs.open strSQL, dBaseConn
%>

How can it work one minute and then not the next?
Can anyone make any sense of this for me please?
unclechris is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-17-2006, 07:21 AM Re: No value given for one or more required parameters. HELP!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
more than likely the hardcoded path is different when on the site.

use server.mappath("path_filename.mdb")
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-17-2006, 08:59 AM Re: No value given for one or more required parameters. HELP!
Novice Talker

Posts: 8
Trades: 0
No, that's not it. Firstly I used:

<%
dBasePath = Server.MapPath("access_db/filename.mdb")
%>

Secondly, the site works sometimes on the site. Then it comes up with this parameter error other times. I don't get it.
unclechris is offline
Reply With Quote
View Public Profile
 
Old 02-17-2006, 09:30 AM Re: No value given for one or more required parameters. HELP!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
no idea

bit of basic debugging needed. response.write out the values of the variables before they are used so you can see which one is empty.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-17-2006, 09:34 AM Re: No value given for one or more required parameters. HELP!
Novice Talker

Posts: 8
Trades: 0
Quote:
Originally Posted by chrishirst
no idea

bit of basic debugging needed. response.write out the values of the variables before they are used so you can see which one is empty.
hmm - you wouldn't be willing to give me a "basic" tutorial here would you? (I'm not sure what the variables are - told you I'm an amateur!!)
unclechris is offline
Reply With Quote
View Public Profile
 
Old 02-17-2006, 09:38 AM Re: No value given for one or more required parameters. HELP!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
dBaseConn & strConn are the ones to look at
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-17-2006, 09:44 AM Re: No value given for one or more required parameters. HELP!
Novice Talker

Posts: 8
Trades: 0
Quote:
Originally Posted by chrishirst
dBaseConn & strConn are the ones to look at
OK - strConn returns:

SELECT * FROM Content where id=10

and dBaseConn returns:

Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data Source=d:\hosting\domain_name\access_db\file_name. mdb;Mode=Share Deny None;Extended Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False


Microsoft JET Database Engine
error '80040e10'
No value given for one or more required parameters. /home.asp, line 12

Does that mean anything to you?

Something I've just noticed by accident. One of my scripts never pulls the error. The only difference seems to be that I don't use the WHERE statement in the strConn. So I went and removed the WHERE statement in the first script, and no error either. The dBaseConn was exactly the same.

So, what the heck is wrong with "SELECT * FROM Content where id=10"? If I'm even on the right track...

Last edited by unclechris; 02-17-2006 at 10:11 AM..
unclechris is offline
Reply With Quote
View Public Profile
 
Old 02-17-2006, 04:30 PM Re: No value given for one or more required parameters. HELP!
Novice Talker

Posts: 8
Trades: 0
OK, it seems the problem was actually that 'id' was case sensitive. In the database it was 'ID'. Changing the SQL statement to

SELECT * FROM Content where ID=10

fixed the whole thing. Shame on me for writing sloppy case insensitive code.
unclechris is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to No value given for one or more required parameters. HELP!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26691 seconds with 12 queries