Skip to main content
Inspiring
July 23, 2008
Answered

Tutorial Confusion

  • July 23, 2008
  • 1 reply
  • 1052 views
I'm following the "ColdFusion 8 Getting Experience Tutorial" and I'm on page 30 where I add cfquery tags. The example works fine without the tags but with them my Firefox browser give the error:

No value given for one or more required parameters.

I've attached the first part of my code so that someone else might show me my error.
This topic has been closed for replies.
Correct answer alan_lindsay
OK, a little more learning. I found out how to get cf to provide some debug info and it shows:

Error Executing Database Query.
No value given for one or more required parameters.

The error occurred in C:\Inetpub\wwwroot\cf8gettingstarted\tutorial\index.cfm: line 1
1 : <cfquery name="artwork" datasource="cftutorial">
2 : SELECT FIRSTNAME, LASTNAME, ARTNAME, DESCRIPTION, PRICE, LARGIMAGE, ISSOLD, MEDIATYPE
3 : FROM ARTISTS, ART, MEDIA
and then goes on to show a an msaccess error:

com.inzoom.adojni.ComException: No value given for one or more required parameters. in Microsoft JET Database Engine code=3088 Type=1

Problem solved through trial and error! I found that if I changed the select statement to just *, it all worked. Then I began gradually building up the query until I made a typo and got the same error as I got before. Checking my original query statement VERY carefully, I found that I had specified LARGIMAGE instead of LARGEIMAGE!!

1 reply

Known Participant
July 24, 2008
Your media table that your reference in your WHERE clause is not referenced in the FROM portion of your select statement, for starters.
Inspiring
July 24, 2008
Well spotted! Unfortunately, fixing it didn't solve the problem. Executing the code still gets the response:

Error Executing Database Query.
No value given for one or more required parameters.

It executes without error if I remove the cfquery tags. Mind you, I don't yet understand how the sql executes correctly when there is no explicit reference to a database, merely tables. Since this is the first explicit reference to the datasource, perhaps there is a problem with it's definition - I'll explore that.
Inspiring
July 24, 2008
OK, a little more learning. I found out how to get cf to provide some debug info and it shows:

Error Executing Database Query.
No value given for one or more required parameters.

The error occurred in C:\Inetpub\wwwroot\cf8gettingstarted\tutorial\index.cfm: line 1
1 : <cfquery name="artwork" datasource="cftutorial">
2 : SELECT FIRSTNAME, LASTNAME, ARTNAME, DESCRIPTION, PRICE, LARGIMAGE, ISSOLD, MEDIATYPE
3 : FROM ARTISTS, ART, MEDIA
and then goes on to show a an msaccess error:

com.inzoom.adojni.ComException: No value given for one or more required parameters. in Microsoft JET Database Engine code=3088 Type=1