473,839 Members | 1,362 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Intermittent database error

I am getting an intermittent database error on my asp page.

I am using Access 2003 with classic ASP.

The error is this:
Microsoft JET Database Engine Error 80040e10
No value given for one or more required parameters
/subweb/search.asp, line 163

Line 163 is starred below:

With rs
.CursorLocation =3 'adUserClient
.ActiveConnecti on=cn
.source=sSql
.Open <-error here
End With

The
May 26 '06 #1
8 1868
Dave wrote:
I am getting an intermittent database error on my asp page.

I am using Access 2003 with classic ASP.

The error is this:
Microsoft JET Database Engine Error 80040e10
No value given for one or more required parameters
/subweb/search.asp, line 163

Line 163 is starred below:

With rs
.CursorLocation =3 'adUserClient
.ActiveConnecti on=cn
.source=sSql
.Open <-error here
End With

Without seeing the sql statement or how it is built, one can only guess.

The error can be caused by:
1. Using a word in the query which cannot be resolved to an object (such as
a field or table) in the database. In this case, Jet assumes that you are
attempting to use a parameter and, when it finds no value for the parameter
has been passed, throws an error.
2. Rarely, using a reserved keyword for a database object name can cause
this error, but more likely this will result in a syntax error being thrown.

My suggestion, given that the symptom is intermittent, is to trap the error
and log the sql statement to a text file so it can be inspected.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
May 26 '06 #2
Hi Dave,

Just check if you are passing a blank value in sql query, print the
query and check it, if a blank value is getting passed then put a '-'
or any valid character.

Vicky

May 27 '06 #3
Thanks Bob and Vickey.

I get this error inconsistently using the same parameters.

For example, when I click on link to load a new page, I pass a parameter to
load a record in a new page. I can click on the same link over and over
again and sometimes it works and sometimes it errors out.

I am wondering if the problem may be due to the use of aggregates in a view
(saved query).

Here is what my code looks like in the ASP page:

sSQL= "SELECT WordID, Word, "
sSQL= ssql & "CountExamp le, CountMastery, CountProficient , CountDeficient
"
sSQL= ssql & " FROM vWords "

if sFirstLetterSel ect <> "All" then
sWhere = " WHERE word LIKE '" & trim(sFirstLett erSelect) & "%' "
sSQL = sSQL & sWhere
end if

Select Case lcase(sSort)
case "word":
sSQL = sSQL & " ORDER BY word"
case "wordid":
sSQL = sSQL & " ORDER BY wordid, word"
case "countexamp le":
sSQL = sSQL & " ORDER BY countexample DESC, word"
case "countdeficient ":
sSQL = sSQL & " ORDER BY countdeficient DESC, word"
case "countproficien t":
sSQL = sSQL & " ORDER BY countproficient DESC, word"
case "countmaste ry":
sSQL = sSQL & " ORDER BY countmastery DESC, word"
case else
sSQL = sSQL & " ORDER BY word"
End Select
When I print out the SQL string with Response.Write( sSQL) it looks like
this:

SELECT WordID, Word, CountExample, CountMastery, CountProficient ,
CountDeficient FROM vWords WHERE word LIKE 'A%' ORDER BY word

What is a little different from what I normally do in Access is I reference
a saved query rather than a table. So vWord is a view with the following
definition:

SELECT Word.WordID
, Word.Word
, (SELECT count(*) from WordExample WHERE wordid=word.wor did ) AS
CountExample
, (SELECT count(*) from Answer WHERE gradeid=1 and
answer.wordid=w ord.wordid ) AS CountMastery
, (SELECT count(*) from Answer WHERE gradeid=2 and
answer.wordid=w ord.wordid ) AS CountProficient
, (SELECT count(*) from Answer WHERE gradeid=3 and
answer.wordid=w ord.wordid ) AS CountDeficient
FROM Word;

I though that perhaps if the wordid is null in the Answer table then the
query might choke. However, this is not the case; there are times when
wordid is null and the query executes properly.

Does anyone see any potential problems with what I am doing?




May 28 '06 #4
Dave wrote:
Thanks Bob and Vickey.

I get this error inconsistently using the same parameters.

When I print out the SQL string with Response.Write( sSQL) it looks
like this:

SELECT WordID, Word, CountExample, CountMastery, CountProficient ,
CountDeficient FROM vWords WHERE word LIKE 'A%' ORDER BY word

Is this the sql statement that caused the error? I.E., did you trap the
error and response.write it when the error occurred?


I though that perhaps if the wordid is null in the Answer table then
the query might choke. However, this is not the case; there are
times when wordid is null and the query executes properly.

Does anyone see any potential problems with what I am doing?


I see nothing that would lead to this error.

I would suggest using a saved parameter query instead of dynamic sql ...

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
May 28 '06 #5

"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message
news:ua******** ******@TK2MSFTN GP04.phx.gbl...
Dave wrote:
Thanks Bob and Vickey.

I get this error inconsistently using the same parameters.

When I print out the SQL string with Response.Write( sSQL) it looks
like this:

SELECT WordID, Word, CountExample, CountMastery, CountProficient ,
CountDeficient FROM vWords WHERE word LIKE 'A%' ORDER BY word

Is this the sql statement that caused the error? I.E., did you trap the
error and response.write it when the error occurred?


I though that perhaps if the wordid is null in the Answer table then
the query might choke. However, this is not the case; there are
times when wordid is null and the query executes properly.

Does anyone see any potential problems with what I am doing?


I see nothing that would lead to this error.


From distant memory (I have used JET in earnest for some time now) but
doesn't JET treat any identifier not in the fieldset as parameter. I seem
to remember getting this error often because of a typo in field name left
JET thinking it was looking for a parameter.

I would suggest using a saved parameter query instead of dynamic sql ...

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

May 29 '06 #6

"Anthony Jones" <An*@yadayadaya da.com> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..

"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message
news:ua******** ******@TK2MSFTN GP04.phx.gbl...
Dave wrote:
Thanks Bob and Vickey.

I get this error inconsistently using the same parameters.

When I print out the SQL string with Response.Write( sSQL) it looks
like this:

SELECT WordID, Word, CountExample, CountMastery, CountProficient ,
CountDeficient FROM vWords WHERE word LIKE 'A%' ORDER BY word

Is this the sql statement that caused the error? I.E., did you trap the
error and response.write it when the error occurred?


I though that perhaps if the wordid is null in the Answer table then
the query might choke. However, this is not the case; there are
times when wordid is null and the query executes properly.

Does anyone see any potential problems with what I am doing?


I see nothing that would lead to this error.


From distant memory (I have


NOT (why hasn't some one come up with a 'thought-to-text' UI by now :)
used JET in earnest for some time now) but
doesn't JET treat any identifier not in the fieldset as parameter. I seem
to remember getting this error often because of a typo in field name left
JET thinking it was looking for a parameter.

I would suggest using a saved parameter query instead of dynamic sql ...

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


May 29 '06 #7
Anthony Jones wrote:
When I print out the SQL string with Response.Write( sSQL) it looks
like this:

SELECT WordID, Word, CountExample, CountMastery, CountProficient ,
CountDeficient FROM vWords WHERE word LIKE 'A%' ORDER BY word

Is this the sql statement that caused the error? I.E., did you trap
the error and response.write it when the error occurred?


I though that perhaps if the wordid is null in the Answer table then
the query might choke. However, this is not the case; there are
times when wordid is null and the query executes properly.

Does anyone see any potential problems with what I am doing?


I see nothing that would lead to this error.


From distant memory (I have used JET in earnest for some time now) but
doesn't JET treat any identifier not in the fieldset as parameter. I
seem to remember getting this error often because of a typo in field
name left JET thinking it was looking for a parameter.

I believe I stated that in my first reply ... yes, that was the first reason
I mentioned.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
May 29 '06 #8

"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message
news:e4******** ******@TK2MSFTN GP05.phx.gbl...
Anthony Jones wrote:
When I print out the SQL string with Response.Write( sSQL) it looks
like this:

SELECT WordID, Word, CountExample, CountMastery, CountProficient ,
CountDeficient FROM vWords WHERE word LIKE 'A%' ORDER BY word
Is this the sql statement that caused the error? I.E., did you trap
the error and response.write it when the error occurred?

I though that perhaps if the wordid is null in the Answer table then
the query might choke. However, this is not the case; there are
times when wordid is null and the query executes properly.

Does anyone see any potential problems with what I am doing?

I see nothing that would lead to this error.

From distant memory (I have used JET in earnest for some time now) but
doesn't JET treat any identifier not in the fieldset as parameter. I
seem to remember getting this error often because of a typo in field
name left JET thinking it was looking for a parameter.

I believe I stated that in my first reply ... yes, that was the first

reason I mentioned.
Oops so you did. My bad. :)

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

May 30 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2029
by: bloodhound | last post by:
Hi, Problem with global.asa not firing 100% of the time. This error crops up several times throughout the day but if you wait a while and reload the page (could be 5 mins or an hour) it will suddenly start working again. The error is: ADODB.Recordset error '800a0bb9' Arguments are of the wrong type, are out of acceptable range, or are in
0
292
by: deevoy | last post by:
Hi- I'm developing a asp.net web application and everything has proven fine on the dev and acceptance environment. We've moved the code up to our windows server 2003 prod environment and get the following intermittent error when browsing the web page through a client browser (the action causing this is paging though a datagrid- although it randomly errors, rather than erroring all the time): ________________ Invalid character in a...
8
5053
by: trinitypete | last post by:
Hi all I have a strange problem with IIS windows pass through authentication. Heres the setup IIS running with Windows Authentication for our intranet site. ACL has been set to everyone for all web directories. This is all on a windows 2003 server. We add the intranet site to the intranet zone so the windows credentials will automatically get passed to IIS 90% of the time it works fine, but Intermittently we get access forbidden -...
2
1869
by: Mike Krajewski | last post by:
We are having an intermittent problem using an ExecuteScalar command on a asp.NET page accessing SQL Server. 2 characters of the sql statement get intermittently altered. The code looks as follows: SqlCommand command = new SqlCommand("SELECT fkOWSStatusID FROM vwUsersCleanups WHERE pkCleanupID = 123", connection); object nReturn = command.ExecuteScalar(); About 10% of the time, the 'rs' in vwUsersCleanups get altered into...
2
3095
by: Fabian | last post by:
Hi, I work with asp.net 2.0 and I have a intermittent error, only happens a few times a day. In the page I evaluate a Query String and then I get data form a database. The code snipped: try {
1
1231
by: deevoy | last post by:
Hi- I'm developing a asp.net web application and everything has proven fine on the dev and acceptance environment. We've moved the code up to our windows server 2003 prod environment and get the following intermittent error when browsing the web page through a client browser (the action causing this is paging though a datagrid- although it randomly errors, rather than erroring all the time):
2
2303
by: Liverpool fan | last post by:
I have a VB .NET windows application that is throwing an intermittent 'out of memory' error. Here is the call stack. Out of memory. at System.Drawing.Graphics.FromHdcInternal(IntPtr hdc) at System.Windows.Forms.DibGraphicsBufferManager.CreateBuffer(IntPtr src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height) at System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(Graphics
0
3649
by: gelangov | last post by:
I have posted this before. Now I have SQL server 2005 with Service pack 2. The problem is: I get intermittent problem either when I am loading a file into a table or exporting a table into a text file. I get this following error message: ] Error: SSIS Error Code
15
5622
by: jonnyboy | last post by:
Hello, I'm having an intermittent problem with the back-end of my database. On an intermittent basis, the back-end tables will become read-only. This only happens when the back-end is located on a network share. It isn't a permissions issue because the problem occurs only intermittently when logged in as the same user. If I open the back-end database on its own and then the front-end client (on the local drive) this problem goes...
0
9856
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10910
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10297
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9426
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7021
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5683
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4493
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4066
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.